Pither Rukka Posted November 18, 2010 Posted November 18, 2010 Hi all, Can someone give me sample program like DIMORDINATE but with modified as my picture attached. I need we can choose with Elevation or not, and the Leader Line use Arrowhead as set in dimstyle. Also the values automatically change if point of leader move. Quote
Michaels Posted November 18, 2010 Posted November 18, 2010 Hi asos2000, How did you make that kind of leader , and is there any Lisp could make it ? Thanks Quote
Lee Mac Posted November 18, 2010 Posted November 18, 2010 As a modification of an old program: (defun c:DimO ( / *error* ocm units prec fac p ) (vl-load-com) ;; © Lee Mac 2010 (defun *error* ( msg ) (and ocm (setvar 'CMDECHO ocm)) (or (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*") (princ (strcat "\n** Error: " msg " **"))) (princ) ) (mapcar 'set '(fac units prec) (mapcar 'getvar '(DIMLFAC DIMLUNIT DIMDEC))) (setq ocm (getvar 'CMDECHO)) (setvar 'CMDECHO 0) (while (setq p (getpoint "\nSpecify Point <Exit> : ")) (command "_.dimordinate" "_non" p "_T" (strcat "N " (rtos (* fac (cadr p)) units prec) "\\PE " (rtos (* fac (car p)) units prec) "\\PEL. "(rtos (* fac (caddr p)) units prec) ) pause ) ) (setvar 'CMDECHO ocm) (princ) ) Quote
Pither Rukka Posted November 19, 2010 Author Posted November 19, 2010 Thanks Lee Mac, but i need the E, N, and EL. value link if point moved, and can it use Arrowhead like Leader. Also can the text to aligned as leader direction. Quote
irneb Posted November 19, 2010 Posted November 19, 2010 Hi asos2000, How did you make that kind of leader , and is there any Lisp could make it ? Thanks The "leader" asos gave is actually a dynamic block. It simply has fields inside attributes pointing to its insertion point, showing E as the X value and N as the Y. You could probably do the same thing for EL as the Z value. To figure out how he's done it, select the block and type BEDIT. You should now see the internals of the DB - all the parameters (looking like dimensions) and the actions like stretch. Also double click one of the attributes - notice the Default value has a gray background, this means it's a field. If you double click that you'll see what field codes it's using. From this you should be able to modify as you want yourself. As for leaders / multileaders, there's no such field-code. So it'll have to be similar to Lee's code. You could add an object reactor to the leader to update the text as the leader is moved / stretched - but that's a bit of advanced lisping:wink:. Quote
Michaels Posted November 19, 2010 Posted November 19, 2010 The "leader" asos gave is actually a dynamic block. It simply has fields inside attributes pointing to its insertion point, showing E as the X value and N as the Y. You could probably do the same thing for EL as the Z value. To figure out how he's done it, select the block and type BEDIT. You should now see the internals of the DB - all the parameters (looking like dimensions) and the actions like stretch. Also double click one of the attributes - notice the Default value has a gray background, this means it's a field. If you double click that you'll see what field codes it's using. From this you should be able to modify as you want yourself. As for leaders / multileaders, there's no such field-code. So it'll have to be similar to Lee's code. You could add an object reactor to the leader to update the text as the leader is moved / stretched - but that's a bit of advanced lisping:wink:. Thank you so much for all these explainations. But how to give the Insertion Point for that leader and keep it updated to the x,y,z of the head of the leader ? Many Thanks Quote
irneb Posted November 19, 2010 Posted November 19, 2010 Thank you so much for all these explainations. But how to give the Insertion Point for that leader and keep it updated to the x,y,z of the head of the leader ? Many Thanks You're welcome! To have it update automatically, that's why I stated the reactor stuff together with Lee's code. It's just not very simple to do. But the block route will update on actions such as regen. No need for coding. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.