Jump to content

Macro for temporarily setting polyline width


Glen1980

Recommended Posts

^C^C_plinewid;25;pline;/plinewid;0;

 

I might be onto a looser here but I am looking for a way of drawing a poly line of 25 units wide then resetting the polyline width to 0. This is for LT so macro's only please.

 

The above macro does set the width and lets me draw my polyline once I finish the line the macro doesn't continue to reset the polyline widths. Is it even possible to this in a single macro?

Link to comment
Share on other sites

  • Replies 20
  • Created
  • Last Reply

Top Posters In This Topic

  • Glen1980

    11

  • ReMark

    6

  • steven-g

    4

Top Posters In This Topic

Have you given any consideration to an alternate approach? For example, how about a macro that draws a polyline of a specified width without changing the changing the global PLINEWID value?

Link to comment
Share on other sites

Hmmm......I was thinking of it more like a temporary override.

 

(macro removed as it wasn't a true diesel macro; sorry about that folks)

Edited by ReMark
Link to comment
Share on other sites

Hang on, I ran that from my toolpallate and it said

Command: (setq LISP command is not available.
Command: pwid Unknown command "PWID".  Press F1 for help.
Command: (getvar LISP command is not available.
Command: "plinewid"))
Unknown command ""PLINEWID"))".  Press F1 for help.

 

Will try from the ribbon.

Link to comment
Share on other sites

Nope not working. I've added it to the cui as a new command. Is there something I'm missing/not doing correctly to use Diesel programmes within LT?

Link to comment
Share on other sites

My bad then. I really did think it was a diesel macro. Now I'm not so sure given what you posted above. My apologies. I'll continue to research it. In the meantime maybe someone will come along and save me from myself. LoL

Link to comment
Share on other sites

ReMark that is definitely LISP, diesel has things like $M=$(getvar,plinewid) in it. Though I do believe that in Full Autocad diesel and LISP can be mixed into a macro.

The problem with a macro is when it starts a command you can't just exit out after an arbitrary amount of points or it just cancels the rest of the macro.

This is a bit long winded but as it stands it will allow you to draw a polyline up to 6 segments in length, and you can cancel out after 1 or 2 or 3 etc

^C^C^C_pl;\\;_pe;l;w;25;;_pl; \;_pe;l;w;25;;selectsimilar;l;;_m;0,0;0,0;_pe;l;j;p;;;_pl; \;_pe;l;w;25;;selectsimilar;l;;_m;0,0;0,0;_pe;l;j;p;;;_pl; \;_pe;l;w;25;;selectsimilar;l;;_m;0,0;0,0;_pe;l;j;p;;;_pl; \;_pe;l;w;25;;selectsimilar;l;;_m;0,0;0,0;_pe;l;j;p;;;_pl; \;_pe;l;w;25;;selectsimilar;l;;_m;0,0;0,0;_pe;l;j;p;;;

Link to comment
Share on other sites

Thank you Steven that one works perfectly. It looks simple now you have done it. I could never work out what the last command was really for, I always used previous and though last to be a bit limited. Are there any online resources you can recommend to learn diesel?

Link to comment
Share on other sites

ReMark don't even think of hiding we'd all be lost without you, :D

Glen I'll try and dig out a list of some of the sites I regularly find myself looking at, just give me a couple of hours.

Link to comment
Share on other sites

You're welcome, I was pretty sure you asked another question yesterday, but I can't find it anymore, the answer is yes it can be done (or maybe it wasn't you!)

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