View Full Version : Layer help.
Gratitude1977
15th Nov 2010, 08:11 pm
Hi all,
I am trying to complete this insertion for a block with buttons. Here is what I want to do;
Insert a block on a new layer and have the layer return to the previous layer before the block was inserted.
This is what I have so far.
^C^C-la;make;"newlayer";;-insert;"block";;(this is where I am stuck at.
Any ideas?
Thanks
ReMark
15th Nov 2010, 08:15 pm
Wouldn't you have to use the layer command again and the "set" layer option to complete the task?
Gratitude1977
15th Nov 2010, 08:17 pm
I am trying to avoid this if possible by having the layer return to the previous one with the command.
ReMark
15th Nov 2010, 08:22 pm
And you can't make this happen by adding -la;s; add layer name here to the macro you have already?
make a layer - insert a block - reset the layer
Gratitude1977
15th Nov 2010, 08:24 pm
The issue occurs when the block insertion asks for the insertion point. it nulls the layer command after that.
hazardman
15th Nov 2010, 09:40 pm
you wont's be able to do such a macro, as you pointed out, it will stop when asking for the insertion point...you will need to either create a lisp routing and assign that to your button or use the tool pallete...what's nice about the tool palette is that you can change the properties of the block object (on the palette, right click over the block object) so that it will insert it on a particular layer 9it probably must already exist in the drawing tho) without having to change to that layer...
ReMark
15th Nov 2010, 11:53 pm
Make the insertion point 0,0 or any other meaningful coordinate.
BIGAL
16th Nov 2010, 03:40 am
^C^C-la;make;"newlayer";;-insert;"block";;(this is where I am stuck at.
^C^C(setq oldlayer (getvar "clayer")) -la;make;"newlayer";;-insert;"block";; (setvar "clayer" oldlayer)
may be missing a couple of ; but as per Rremark save layer do your thing and set it back again just so common in programs lisp's or vba etc also osmode
^c^c-INSERT G:/Autodesk/blocks/cars/ferrari DRAG \1 1 0
Powered by vBulletin™ Version 4.1.2 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.