I am working in Autocad MEP and I am trying to get the Normal of an object by using Property Sets and vbscript. I am not sure if it is even possible. I found this article on the Autodesk website.
http://usa.autodesk.com/adsk/servlet/ps/dl/item?siteID=123112&id=6057466&linkID=9240657 that describes how to add a property that is not an automatic property of the object and showed this vbscript code.
RESULT="--"
On Error Resume Next
Set AcadApp = GetObject(, "AutoCAD.Application")
Set Obj = AcadApp.Activedocument.Objectidtoobject("xxxxx")
RESULT= Obj.area
I modified Obj.area to instead be obj.normal but the property set only displays --. I know the code works because i changed obj.normal to obj.rotation and it gave the rotation of the fitting.
Does anyone have any idea on how to grab the normal of an object inside of a property set in Autocad MEP or Autocad Architecture? I need it so I can see if a duct fitting has been rotated around its centerline. The rotation parameter only returns rotation in the XY plane. I need a rotation in the XZ plane or ZY plane which can be determined from the Normal of the fitting.
I did use the VBA to inspect an AecbDuctFitting's properties and Normal was one of them that was available.
Thank you for any help.