- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi Everybody,
There is a way to include objects in X-Ref to de included in the ObjectCollection from this code?
(context: it's a vbscrpit used in a Property Set Definition from AutoCAD Architecture to calculate the total lenght of specific walls ([Style]. Actually, it only calculate the walls present in the current drawing).
Thank's
Set app = GetObject (,"AutoCAD.Application")
On Error Resume Next
RESULT = "--"
Set baseApp = app.GetInterfaceObject("AecX.AecArchBaseApplication.8.4")
Set ActiveDoc =baseApp.ActiveDocument
Set ObjectCollection = ActiveDoc.ModelSpace
totLength = 0
s = "[Style]"
For Each Object In ObjectCollection
If Object.StyleName = s Then
totLength = totLength + Object.Length
End IF
Next
RESULT = totLength/100
Solved! Go to Solution.