Diesel Posted November 8, 2013 Posted November 8, 2013 I have a macro ^C^C(setvar “cecolor” “ByLayer”) (setvar “celweight” -1) (setvar “celtype” “ByLayer”) This is the error: Command: (setvar LISP command is not available. Command: “cecolor” Unknown command "“CECOLOR”". Press F1 for help. Command: “ByLayer”) Unknown command "“BYLAYER”)". Press F1 for help. can't seem to get it to work. Any help would be great. Thanks Quote
mwade93 Posted November 8, 2013 Posted November 8, 2013 Give me like 5 minutes, I should be able to knock a correction out for you. Quote
MSasu Posted November 8, 2013 Posted November 8, 2013 One thing to check are the quotes - did you created that in Word? Try to replace them with ("). Make sure also that there is a space at the end of that macro. Quote
mwade93 Posted November 8, 2013 Posted November 8, 2013 Silly me, that's easy. Just put: ^C^C^Csetvar;cecolor;bylayer;setvar;celweight;-1;setvar;celtype;Bylayer; LT has the ability to use setvar, just not getvar plainly, getvar has to be burried in a diesel string. Quote
MSasu Posted November 8, 2013 Posted November 8, 2013 Ooops... Seems that the OP is using LT, so AutoLISP isn't supported! Quote
Diesel Posted November 8, 2013 Author Posted November 8, 2013 Silly me, that's easy. Just put: ^C^C^Csetvar;cecolor;bylayer;setvar;celweight;-1;setvar;celtype;Bylayer; LT has the ability to use setvar, just not getvar plainly, getvar has to be burried in a diesel string. It gives me this now: Command: setvar Enter variable name or [?] : celtype Enter new value for CELTYPE : Bylayer Quote
Tuns Posted November 8, 2013 Posted November 8, 2013 ^C^Ccecolor;"ByLayer";celweight;-1;celtype;"BYLAYER"; Try that? I don't think you need "setvar" here. Quote
mwade93 Posted November 8, 2013 Posted November 8, 2013 Thats true Tuns. You shouldn't need it, it actually shouldn't make any difference. Ooops... Seems that the OP is using LT, so AutoLISP isn't supported! Tell me about it. Half the stuff I want to do I can't. Quote
Diesel Posted November 8, 2013 Author Posted November 8, 2013 ^C^Ccecolor;ByLayer;celweight;-1;celtype;ByLayer; Try that? I don't think you need "setvar" here. Still wants me to enter a new value for celtype Command: cecolor Enter new value for CECOLOR : ByLayer Command: celweight Enter new value for CELWEIGHT : -1 Command: celtype Enter new value for CELTYPE : ByLayer Quote
Tuns Posted November 8, 2013 Posted November 8, 2013 It wont change celtype because it is just one of those variables that wont accept the same value. The only way you can fix it is by just taking it out of the macro. Quote
mwade93 Posted November 8, 2013 Posted November 8, 2013 Still wants me to enter a new value for celtype One way to do it is do an if statement with some diesel to avoid issuing that change. Quote
Tuns Posted November 8, 2013 Posted November 8, 2013 Oops, I updated my macro. Try it one more time? Quote
Diesel Posted November 8, 2013 Author Posted November 8, 2013 Also can you guys give me some websites to learn macros better or maybe a book. Also do Macros work with Autocad 2014 LT... I was told yes by some people and no by others. Thanks Quote
mwade93 Posted November 8, 2013 Posted November 8, 2013 The main thing you can't use with LT is just LISP VBA .NET, so all the fun languages. Diesel is the way to go. Here is the AutoDESK guide for LT 2012. Best one by far 2013 is much less complete. http://exchange.autodesk.com/autocad/sites/default/files/autocad_pdf_cust-guide_enu_v2_0.pdf Quote
Diesel Posted November 8, 2013 Author Posted November 8, 2013 Oops, I updated my macro. Try it one more time? This is the error: Enter new value for CECOLOR : "ByLayer" Command: celweight Enter new value for CELWEIGHT : 1 Cannot set CELWEIGHT to that value. *Invalid* Quote
mwade93 Posted November 8, 2013 Posted November 8, 2013 You can;t set celweight to 1. You can only select -1, -2, or -3. http://exchange.autodesk.com/autocad/enu/online-help/ACD/2012/ENU/pages/WS1a9193826455f5ffa23ce210c4a30acaf-50de.htm Quote
Tuns Posted November 8, 2013 Posted November 8, 2013 You copied it wrong. Make sure you have the negative value in the macro. Where did you get the positive 1? Anyways, Mwade will take care of ya from here since I'm leaving work now. Good luck Diesel. Quote
Diesel Posted November 8, 2013 Author Posted November 8, 2013 The main thing you can't use with LT is just LISP VBA .NET, so all the fun languages. Diesel is the way to go. Here is the AutoDESK guide for LT 2012. Best one by far 2013 is much less complete. http://exchange.autodesk.com/autocad/sites/default/files/autocad_pdf_cust-guide_enu_v2_0.pdf Thank you very much Quote
mwade93 Posted November 8, 2013 Posted November 8, 2013 Thank you very much You are welcome Diesel is just a learn as you go thing. Doesn't take long to pick up though. If you have questions, just post em here, someone will help. Here are a couple fun diesel macros for you: ^C^Csetvar;useri2;$M=$(getvar,attreq);^P$M=$(if,$(<,$(getvar,useri1),13),attreq;1;-insert;delta;\1;1;0;$M=$(getvar,useri1);-la;t;rev$M=$(getvar,useri1);;chprop;L;;LA;rev$M=$(getvar,useri1);;,^C)^Zattreq;"$M=$(getvar,useri2)"; ^C^C^P$M=$(if,$(=,$(getvar,tilemode),0),-insert;schedule.dwg;^C^C-insert;electrical_notes;\1;1;0;x;l;;^Z Quote
Diesel Posted November 8, 2013 Author Posted November 8, 2013 You copied it wrong. Make sure you have the negative value in the macro. Where did you get the positive 1? Anyways, Mwade will take care of ya from here since I'm leaving work now. Good luck Diesel. Command: cecolor Enter new value for CECOLOR : "ByLayer" Command: celweight Enter new value for CELWEIGHT : -1 Command: celtype Enter new value for CELTYPE : "BYLAYER" I will have Autocad 2014 on Monday and will try with that. Plus read over the pdf Mwade showed me. Thanks 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.