Author Topic: Macro Help - Linetype  (Read 2115 times)

0 Members and 1 Guest are viewing this topic.

craigr

  • Guest
Macro Help - Linetype
« on: November 05, 2004, 11:52:54 AM »
I have a few icons set up with macros to select the linetype & Scale.

Here is what we use to set to 'dashdot' -

^C^C_snap;on;linetype;s;dashdot;;celtscale;.4;_line

I would like the macro to set the linetype back to 'continuous' once the line is drawn.

With the above macro, once you draw your 'dashdot' line, then start to draw another line, such as a pline, it is also drawn as 'dashdot'. Also, any text you create is also of the linetype 'dashdot'. - this I don't want.

I know I could set the linetype back to 'continuous' before any commands, but I would like to modify the above macro to do it automatically.

How 'bout it you macro gurus?

thanks in advance, craigr

PDJ

  • Guest
Macro Help - Linetype
« Reply #1 on: November 05, 2004, 12:27:36 PM »
I'm not a macro kinda guy but, I know in lisp, you'd store the current linetype, change to the one you want, then restore the linetype after you're finished.  Maybe we can work along those same lines with your macro.  Something like this:

^C^C_snap;on;linetype;s;dashdot;;celtscale;.4;_line;linetype;s;continuous

Like I said, I'm not a Macro user but, I would think it would be as easy as that..

craigr

  • Guest
Macro Help - Linetype
« Reply #2 on: November 05, 2004, 12:31:41 PM »
I see what you did, but that wouldn't allow time to draw the line first. It would simply change the linetype to dashdot then back to continuous without drawing the line.

Am I right?

craigr

David Bethel

  • Swamp Rat
  • Posts: 656
Macro Help - Linetype
« Reply #3 on: November 05, 2004, 12:56:42 PM »
There isn't a (while) statement available in deisel, so other than
line;;
for single line segment ( or any preset number of inputs ), you are kind of stuck

Also you can CELTYPE instead of the command line version.  The linetype must be pre loaded.  

Then it could be line;;celtype;continuous

In AutoLisp it could look like

(setvar "CELTYPE" "DASHDOT")
(command "_.LINE")
(while (> (getvar "CMDATIVE") 0)
          (command pause))        
(setvar "CELTYPE" "CONTINUOUS")


-David
R12 Dos - A2K