Jump to content

Recommended Posts

Posted

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

Posted

Wouldn't you have to use the layer command again and the "set" layer option to complete the task?

Posted

I am trying to avoid this if possible by having the layer return to the previous one with the command.

Posted

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

Posted

The issue occurs when the block insertion asks for the insertion point. it nulls the layer command after that.

Posted

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

Posted

Make the insertion point 0,0 or any other meaningful coordinate.

Posted

^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

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