![]() This is how it looks like before editing:Īnd here is how it looks like after editing the surface contour style with major contour color to red and monor contour color to green. assign the style to the first surface in the document: TODO: do the same for all model display settings as well SurfaceStyle.GetDisplayStylePlan( SurfaceDisplayStyleType SurfaceDisplayStyleType.MinorContour).Color SurfaceDisplayStyleType.MajorContour).Layer = "0" SurfaceDisplayStyleType.MajorContour).Color SurfaceStyle surfaceStyle = styleId.GetObject( create a new style called 'example style': TinSurface surface = trans.GetObject(per.ObjectId, Using ( Transaction trans = doc.TransactionManager If (per.Status != PromptStatus.OK) return ĬivilDocument civilDoc = CivilApplication.ActiveDocument PromptEntityResult per = ed.GetEntity(peo) Peo.AddAllowedClass( typeof( TinSurface), true) Peo.SetRejectMessage( "\nOnly Tin surface is accepted") PromptEntityOptions peo = new PromptEntityOptions( Public void M圜ommand() // This method can have any nameĭocument doc = "SurfaceStyleExample", CommandFlags.Modal)] This is code snippet demonstrating how to do it with API: [ CommandMethod( "MyGroup", "SurfaceStyleExample", We can do it with Civil 3D UI by right clicking the surface object and choose “Edit surface style…” and switching to “Display” tab to show the dialogue as below: I was asked how to edit the style of surface in Civil 3D, for example, we need to change the color of contours. Jeremy Tammik's web and mobile programming blog Jim Quanci's blog on partnering with large companies.īrian Ekins' and Adam Nagy's Inventor developer blog Isaac Rodriguez's AutoCAD Civil 3D developer blog Our DevBlog for Design, Lifecycle and Simulation technologies.Ĭyrille Fauvel's Maya platform developer blog - Autodesk Media and Entertainment technology. Our DevBlog for Infrastructure Modeling technology APIs. Our DevBlog for Cloud and Mobile technologies with a strong emphasis on the Autodesk Forge APIs. Our DevBlog for AutoCAD and other platform technology APIs. Our DevBlog for Revit, Navisworks, AEC and BIM technology APIs. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |