I have no programming experience so I am hoping someone can help me make a lisp file.
I need it too pull out 3 points of data from the block and place them in a multi-leader.
I have included images of what I would like it to look like, the data I need include and the block construction.
If needed I can upload an autocad file.
If it is important I am using autocad 2023
Solved! Go to Solution.
Solved by ВeekeeCZ. Go to Solution.
Try this. I needed to restrict a leader's points to 2. Or it could be 3 if you like, but it needs to be a fixed value.
(defun c:StairCallout ( / s m b d f r w) (if (and (setq s (car (entsel "\nSelect a block: "))) (setq m (getstring "\nRise: ")) (setq b (tblobjname "block" (cdr (assoc 2 (entget s))))) (progn (while (setq b (entnext b)) (and (setq f (entget b)) (= "ATTDEF" (cdr (assoc 0 f))) (= "STAIR_DESCRIPTION" (cdr (assoc 2 f))) (setq d (cdr (assoc 1 f))))) d) (setq r (getpropertyvalue s "AcDbDynBlockPropertyRUN")) (setq w (getpropertyvalue s "AcDbDynBlockPropertyWIDTH")) ) (command "_.mleader" pause pause "_E" (strcat d "\\P" (rtos r) " X " m "\\P" (rtos w) "W"))) (princ) )
This is amazing thank you!
If possible is it possible to convert the width to a fraction?
If not I can still work with this and appreciate the help!
It is a bit of an awkward set up because we need decimal units for other more accurate parts.
This however worked perfectly for these notes!
Thank you so much!
Can't find what you're looking for? Ask the community or share your knowledge.