Jump to content

Macros Autocad 2014 LT


Recommended Posts

Posted

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

  • Replies 28
  • Created
  • Last Reply

Top Posters In This Topic

  • Diesel

    10

  • mwade93

    10

  • Tuns

    7

  • MSasu

    2

Top Posters In This Topic

Posted

Give me like 5 minutes, I should be able to knock a correction out for you.

Posted

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.

Posted

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.

Posted

Ooops... Seems that the OP is using LT, so AutoLISP isn't supported!

Posted
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

Posted

^C^Ccecolor;"ByLayer";celweight;-1;celtype;"BYLAYER";

Try that? I don't think you need "setvar" here.

Posted

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.

Posted
^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

Posted

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.

Posted
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.

Posted

Oops, I updated my macro. Try it one more time?

Posted

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

Posted
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*

Posted

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.

Posted
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

Posted
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

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...