Gratitude1977 Posted November 15, 2010 Posted November 15, 2010 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 Quote
ReMark Posted November 15, 2010 Posted November 15, 2010 Wouldn't you have to use the layer command again and the "set" layer option to complete the task? Quote
Gratitude1977 Posted November 15, 2010 Author Posted November 15, 2010 I am trying to avoid this if possible by having the layer return to the previous one with the command. Quote
ReMark Posted November 15, 2010 Posted November 15, 2010 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 Quote
Gratitude1977 Posted November 15, 2010 Author Posted November 15, 2010 The issue occurs when the block insertion asks for the insertion point. it nulls the layer command after that. Quote
hazardman Posted November 15, 2010 Posted November 15, 2010 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... Quote
ReMark Posted November 15, 2010 Posted November 15, 2010 Make the insertion point 0,0 or any other meaningful coordinate. Quote
BIGAL Posted November 16, 2010 Posted November 16, 2010 ^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 Quote
Recommended Posts
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.