- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi
I am trying to build a property set to attached to 3d polyline as built information using a formula using a script that will return the start and end point elevations, but to start with I am trying to just return the length. Below is what i have come up with to date. When I change activedrawing to thisdrawing in VBA to test it works but having no luck as a script just returns the whole script as text.
Does any have examples of doing this that they could share or know what could be wrong.
RESULT = "--"
On Error Resume Next
Set oApp = GetObject(, "AutoCAD.Application")
' Runs in AutoCAD 2021 with axdb24enu.tlb (must be referenced) AutoCAD/ObjectDBX Common 24.0 Type Library
Set oAutocadApp = oApp.GetInterfaceObject("ObjectDBX.AxDbDocument.24")
Set obj = oAutocadApp.ActiveDocument.HandleToObject([Handle])
RESULT = obj.Length
Justin Ralston
http://c3dxtreme.blogspot.com/
Solved! Go to Solution.