TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: K12RS on August 14, 2015, 12:23:39 PM
-
Please forgive any wrongdoings
This is my first post
As the title says, I'm trying to access the "Description" from an AECC_COGO_POINT so I can change that entity to a layer based on said Description.
I'm not aprogramming guru but have been doing fine with lisp for years without hurting my brain to learn new stuff.
But perhaps it's time.
LSP code from LDD worked great
(partial)
(setq elist (entget ename))
(setq ptype (cdr (assoc 0 elist))) ;find primative type
(if (= ptype "AECC_COGO_POINT")
(progn
(Read-Description)
(Change-desc-to-Layer-name)
(Make-Layer-Change)
) ;end progn
) ;end if
(defun Read-Description()
(setq ename1 (entget ename))
(setq desc (cdr (assoc 302 elist)))
(if (or (= desc " ") (= desc "") (= desc "."))
(setq desc "null")
); end if
); end Read-Next-Attribute
PLEASE - any ideas or links?
Thanks
-
Welcome to the Swamp, K12RS!
For Civil3D objects you need to use ActiveX/COM, as they don't have DXF codes for most of the properties.
Make sure you run the single line:
(vl-load-com)
at least once per session. This makes sure you can use the vla-, vlax-, functions.
-
Worked!
THANK YOU
-
Welcome to the Swamp. 8)