I downloaded a lisp routine that will align block attributes. The problem is I can only select the attributes one at a time. I'd like to be able select multiple attributes using the selection window or a crossing window, but I haven't had much luck. If you use the AEATTSHOW command, it give you a prompt to "select using window" by pressing W. I'd like to have the same functionality for my Align attributes routine. Any help would be greatly appreciated. below is the portion of code I currently have to select attributes one at a time:
;* Select all attributes to align with the parent selected above and add the attribute entname and the block
;* entname to a list in format ( (AttrEntName BlkEntName) (AttrEntName BlkEntName) (AttrEntName BlkEntName) )
;*
(while (/= TempAttr nil)
(setq
TempAttr (nentsel "\nSelect Attributes to align: ")
)
(if (/= TempAttr nil)
(progn
(setq
TempData (entget (car TempAttr))
)
(if (= (cdr (assoc 0 TempData)) "ATTRIB") ;* Make sure entity selected was an attribute
;*
;* If this is Align or Fit justified text, skip this attribute since these are non-supported justifications
;*
(if (or (= (GetTextJust TempData) "Align") (= (GetTextJust TempData) "Fit"))
(alert "Unsupported attribute justification.\nAlign and Fit justifications not supported")
;else
(progn
(setq
BlkEntName (ssname (ssget (cadr TempAttr)) 0)
ChildAttrList (cons (list (car TempAttr) BlkEntName) ChildAttrList)
)
;*
;* Draw highlight box around selected attribute
;*
(DrawBox TempData)
)
)
)
)
)
)
Solved! Go to Solution.
Solved by pbejse. Go to Solution.
Hope you dont mind attaching the lisp program so we an have a look see instead of recreating the other sub functions shown on your post. e.i. GetTextJust / DrawBox
Here is the full LISP code for the attribute align. I didn't create it, so I don't want to take credit for it. It works great, I just wish I could select attributes a little faster as I use this quite often. Thanks.
@jlscranton wrote:Here is the full LISP code for the attribute align. I didn't create it, so I don't want to take credit for it. It works great, I just wish I could select attributes a little faster as I use this quite often. Thanks.
Try the attached modified code
HTH
Can't find what you're looking for? Ask the community or share your knowledge.