Aftertouch Posted September 1, 2017 Posted September 1, 2017 Hello all, I would like to get a summary of some info of Civil3D pipes and structures. I made this very basic routine: (defun c:foo ( / ) (setq sel (entsel)) (setq ent (car sel)) (setq obj (vlax-ename->vla-object ent)) (princ "\n") (princ (setq startstructure (vlax-get obj 'StartStructure))) (princ "\n") (princ (setq endstructure (vlax-get obj 'EndStructure))) (princ "\n") (princ (setq description (vlax-get obj 'Description))) (princ "\n") (princ (setq startpoint (vlax-get obj 'StartPoint))) (princ "\n") (princ (setq endpoint (vlax-get obj 'EndPoint))) (princ) ) Wich returns me #<VLA-OBJECT IAeccStructure 000001c1c7817880> #<VLA-OBJECT IAeccStructure 000001c1c7814880> 300 mm Ongewapende Betonnen Buis #<VLA-OBJECT 000001c1e4080e90> #<VLA-OBJECT 000001c1e4080c80> Why do i get the VLA-OBJECT info, and not the real content of the property. I also tried the vla-get-property, but that returns the same value... Quote
Stefan BMR Posted September 1, 2017 Posted September 1, 2017 The startstructure variable is a VLA-OBJECT itself, so you have to get the properties of this object in order to use them. Type (vlax-dump-object startstructure T) and study the output. The property you are looking for must be somewhere there. Quote
Hippe013 Posted September 1, 2017 Posted September 1, 2017 Please bear in mind that when attempting to get the start and end points of a Civil 3D pipe you can NOT use (vlax-get-property obj 'StartPoint) or (vlax-get-property obj 'EndPoint). These return point values of (0 0 0) and (0 0 1) respectively. You will have to use (vlax-get-property obj 'PointAtParam 0) and (vlax-get-property obj 'PointAtParam 1) to obtain point values that actually mean something. regards, Hippe013 Quote
Aftertouch Posted September 4, 2017 Author Posted September 4, 2017 Thanks for the replies, i got it working. @Stefan, you where right, i was thinking completely wrong. :-) @Hippe, thanks for the tip. Very usefull! :-) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.