is there a way to see the object model of a c3d drawing? I am looking for access pipe and structure information thru LISP is possible. I dont want to change the data just extract it for use in other LISP routines.
thanks!
Here is some code I put together while researching what could be accessed via lisp. It is by no means complete, but should get you started if you know much about lisp. If you get stuck, ask...oh, I believe another user, Dave Couch, was also pursuing this a while back. Perhaps he can chime in if got any further than this.
;;select a structure (setq ss (ssget ":S" '((0 . "AECC_STRUCTURE")))) (setq struct_Obj (vlax-ename->vla-object (ssname ss 0))) (setq connPipeNames (vlax-get struct_Obj 'connectedpipenames) rim (vlax-get struct_Obj 'rimelevation) hgt (vlax-get struct_Obj 'structureheight) sump (vlax-get struct_Obj 'sumpelevation) connPipes (vlax-get struct_Obj 'connectors) location (vlax-get struct_Obj 'position) ) (setq xyz_location (list (vlax-get location 'x) (vlax-get location 'y) (vlax-get location 'z) ) ) ;;; get the pipe data for the first connected pipe (setq part (vlax-invoke-method connPipes 'item 0)) (setq pipe (vlax-get-property part 'networkpart)) ;;this next line fails, as does any other attempt to acess pipe properties (setq pipename (vlax-get-property pipe 'name)) ;;however, since the Pipe object inherits from a Curve Object, we can get the end points using the start/end params (defun getparam (pipe param) (vlax-safearray->list (vlax-variant-value (vlax-get-property pipe 'pointatparam param) ) ) ) (setq end0 (getparam pipe 0.0) end1 (getparam pipe 1.0) )
Gotta love this forum software. That smiley face in the code is a : followed by an S
I will give this a try and yeah it is a wonderful start! any other suggestions are always helpful.