DesmetMartin Posted March 16, 2016 Posted March 16, 2016 (edited) I have a Lisp from Lee Mac which I would like to be modified. I would like to have a setting that let's you choose which layer it should be on. I have tried to write something myself and only came up with this: ****************************************************************** (setq TASH (getint "\nChoose dimensions layer: Dim. (1), Front view (2)")) ); end while ); progn );TASH = 1, Dim (if (= TASH 1 ) (progn ; S-Dimensions (command "DIM*" "S-DIMENSIONS" "Dimension Layer" 3 "Continuous" -3 1 nil ) ); progn ); if (= TAMR 1) ****************************************************************** and: ****************************************************************** (defun CommandReactor:CommandWillStart (rea cmd) (if (wcmatch (strcase (car cmd)) "*DIM*") (progn (setq *OldClayer* (getvar 'clayer)) (vla-add (vla-get-layers (vla-get-activedocument (vlax-get-acad-object))) (setq TASH (getint "\nChoose dimensions layer: Dim. (1), Front view (2)")) ); end while (setvar 'clayer layerName) ) ) ) ****************************************************************** But I don't know were to put it in the existing lips from Lee Mac. Can anyone help? The lisp from Lee Mac is now; ****************************************************************** http://lee-mac.com/lisp/html/LayerDirectorV1-4.html ****************************************************************** Thanks!! Ps. Check out Lee Mac's lisps! Edited March 16, 2016 by DesmetMartin Quote
broncos15 Posted March 16, 2016 Posted March 16, 2016 First off, as part of Lee's terms of use, he doesn't want others posting his codes, but rather a link to them, see this link: http://lee-mac.com/terms.html. Lee is awesome to provide these programs, so please just delete his code above. Now onto your question, the easiest way to do this is to have a new LISP routine that calls two different versions of Lee's program. Have two different copies of his program (you will need to rename the functions in the 2nd one). You then would call both programs in another LISP routine that turns on either program a, program b, or turns them off. Quote
Lee Mac Posted March 16, 2016 Posted March 16, 2016 Thank you broncos, I very much appreciate your respect & support. DesmetMartin, please refer to my response to your email enquiry sent through my site - I have provided a prototype version of my Layer Director application which incorporates a VIEWDIR test to enable automatic dimension layer selection depending on your view configuration. Lee Quote
DesmetMartin Posted March 17, 2016 Author Posted March 17, 2016 @Broncos15; I changed it immediately, I did not know this was in Lee Mac's terms. My apology for this. @ Lee mac; First of all: thanks for the fast responds! Second: The responds I got from you is with Viewdir. But is it possible to get a "question" which layer you want when you want to place a DIM, and if you then press a number you get the layer which you choose? For example: --> I got this but I can't find how to get it linked to the layers. Thanks! - DesmetMartin 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.