Ad

Wednesday, February 03, 2021

Offset 3D Polyline VBA

Here is how I would offset a 3D Polyline for Civil 3D purposes. It's a bit different than for mechanical because civil engineering works in 2-1/2 D. 

The first step is to collect all of the 3D Vertices. this forum post has an example: https://forums.autodesk.com/t5/civil-3d-forum/get-polyline-coordinates-in-vba/td-p/2451913

Then create a polyline from the 3D Vertices and offset the polyline. The help file has some good code for that: https://help.autodesk.com/view/ACD/2015/ENU/?guid=GUID-80D106A9-A16F-4F32-BDE2-5C5B1F7C2C84

Then collect the polyline vertices and create a new 3D Polyline assigning the appropriate elevation to the vertices. Here is a link to the help file for that: https://help.autodesk.com/view/ACD/2015/ENU/?guid=GUID-21D7283A-552F-4DD8-BB4D-AEA1632186B9


No comments:

LinkWithin

Blog Widget by LinkWithin

Ad