- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
PLZ HELP me in this, Here a code I m working for selection of specific text to transfer their values to insert attribute blocks placed at different points by this code In Different drawing variables change and values mismatched..
Plz help..
(defun C:ACC (/ ss e pt pt1 i p1 p2 p3 p4 p5 p6)
(setq pt1 (getpoint "\nSelected point for CONDUCTOR DETAILS CO-ACC"))
(command "_.insert" "CO-ACC" "_S" 1 "_R" 0 "_NONE" pt1)
(setq s2 (entlast))
(setq ss (ssget '((0 . "text"))))
(setq i 0)
(repeat (sslength ss)
(setq e (ssname ss i))
(setq p1 (cdr (assoc 1 (entget e)))))
(setq ss (ssdel e ss))
(setq e (ssname ss i))
(setq p2 (cdr (assoc 1 (entget e))))
(setq ss (ssdel e ss))
(setq e (ssname ss i))
(setq p3 (cdr (assoc 1 (entget e))))
(setq ss (ssdel e ss))
(setq e (ssname ss i))
(setq p4 (cdr (assoc 1 (entget e))))
(setq ss (ssdel e ss))
(setq e (ssname ss i))
(setq p5 (cdr (assoc 1 (entget e))))
(setq ss (ssdel e ss))
(setq e (ssname ss i))
(setq p6 (cdr (assoc 1 (entget e))))
(setpropertyvalue s2 "ch-1" p2)
(setpropertyvalue s2 "loc-1" p6)
(setpropertyvalue s2 "ch-3" p1)
(setpropertyvalue s2 "loc-3" p4)
(setq pt (getpoint "\nSelected point for SCHEMATIC DIAGRAM SC-ACC"))
(command "_.insert" "SC-ACC" "_S" 1 "_R" 0 "_NONE" pt)
(setq s1 (entlast))
(setq s (entsel "\nSelect exiting ACC1 block" )); Select exiting ACC1 block
(setQ TL1 (getpropertyvalue (car s) "TENSION_LENGTH1"))
(setQ TL2 (getpropertyvalue (car s) "TENSION_LENGTH2"))
(setQ MC1 (getpropertyvalue (car s) "MAST_COUNT1"))
(setQ MC2 (getpropertyvalue (car s) "MAST_COUNT2"))
(setpropertyvalue s1 "TENSION_LENGTH1" TL1)
(setpropertyvalue s1 "TENSION_LENGTH2" TL2)
(setpropertyvalue s1 "MAST_COUNT1" MC1)
(setpropertyvalue s1 "MAST_COUNT2" MC2)
(setpropertyvalue s1 "ch-2" p3)
(setpropertyvalue s1 "loc-2" p5)
)
Solved! Go to Solution.