Leader to block LISP

Darlok69

Usenet Archive
Joined
Aug 5, 2003
Messages
6
Reaction score
0
I have a block that has a rectangle and text in the center of the rectangle that is center justified and I want to be able to connect a leader to the left and the right side of the rectangle. I can connect it to the insertion point of the block but that is in the middle of the text. Any one have any ideas. I use it for callouts and want to to be able to be either left or right side arrowed. Thanks Sean
 
Do the arrows have to be a variable length? If not, why not make two blocks, one with arrow on left side the other on the right side? And, how about top and bottom?
 
What to have the flexibility of being able to change lengths.
 
assuming you know the size of your rectangle, just polar from the ins pt left or right by half the width hth Mark

Darlok69 said:
I have a block that has a rectangle and text in the center of the
rectangle that is center justified
 
did you intend the basepoint to be *not* at 0,0? for "PF"? also I don't get the attdef because I don't have the referrenced shx files. but if I move your rectangle to be centered on 0,0, change the base to 0,0 rename the block to "test", eliminate the attribute then the lisp would be thus:
to draw the leader from right side of block
you'll want to adapt to what you really need but this may give yo an idea of how to proceed. (DEFUN C:PFGr (/ PT1 scale ) (SETQ PT1 (GETPOINT "\nEnter center of spec: ")) (setq scale (getvar "dimscale")) (COMMAND "-INSERT" "test" "_non" pt1 SCALE "" "") (SETQ PT2 (GETPOINT "\nEnter start of lead: ")) (SETQ PT3 (polar pt1 0 (* scale 0.16620884)));this is half the width of your rectangle (SETQ PT4 (LIST (CAR PT2)(CADR PT3))) (COMMAND "LEADER" "_non" PT2 "_non" PT4 "_non" PT3 "" "" "N")
)
 

Latest threads

Back
Top