Jump to content

Macros Autocad 2014 LT


Diesel

Recommended Posts

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

Link to comment
Share on other sites

  • Replies 27
  • Created
  • Last Reply

Top Posters In This Topic

  • Diesel

    10

  • mwade93

    10

  • Tuns

    7

  • MSasu

    2

Top Posters In This Topic

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

^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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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*

Link to comment
Share on other sites

You copied it wrong. Make sure you have the negative value in the macro. Where did you get the positive 1? :lol:

Anyways, Mwade will take care of ya from here since I'm leaving work now. :) Good luck Diesel.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

You copied it wrong. Make sure you have the negative value in the macro. Where did you get the positive 1? :lol:

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

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...