Jump to content

Macro for temporarily setting polyline width


Recommended Posts

Posted

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

  • Replies 20
  • Created
  • Last Reply

Top Posters In This Topic

  • Glen1980

    11

  • ReMark

    6

  • steven-g

    4

Top Posters In This Topic

Posted

One polyline segment or more than one?

Posted

Sorry ReMark, have been at lunch. Sometimes one segment sometimes 2. It's for under kitchen wall unit lighting.

Posted

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?

Posted

No, I thought that would produce a pointed line rather than a solid rectangle.

Posted (edited)

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
Posted

Sorry ReMark, that's too LISPy for me these days. I've moved company and am back on LT now.

Posted (edited)

Look again Glen...it's a diesel macro.

 

I was wrong. Don't look.

Edited by ReMark
Posted

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.

Posted

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?

Posted

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

Posted

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

Posted

Thanks anyway mate. You're still at 499:1 on the could help me:couldn't help me score sheet!

Posted

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?

Posted

Saved by steven. Yeah! Now I can climb back into my hidey hole.

Posted

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.

Posted

No rush Steven, it's 5-to-going home time!

Posted

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!)

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