S-8-N Posted December 1, 2011 Share Posted December 1, 2011 What I am trying to do: I found out you can add your own "commands" to the right click menues. So on the default menu I have added a block that we use a lot, that way I don't have to go to the tool pallet or to the ribben to get it. The Problem: I am getting it to work just fine, mostly. I have gone into the CUI and added a new menu under the Default Menu. I then changed the name to Variable Box, the command name is My Box Thing (this is all testing names), the macro is ^C^CSNAP;.025;-insert;C:/Users/rmock/Documents/BLOCKLIST/VARIABLE_IO1A.DWG;\;;;-la;s;av-detl-medm;;-insert;C:/ACAD_Library/_Blocks/wiring_diagrams/equipment_ID;int;\;;;\\\;;;layerp;layerp; The variable_io1a file is where the dynamic block is at and the Equipment_id is some attributes that get insurted after placing the block. We have a standard layer we put the block on and one we put the attributes on. However when I run/use this shorcut menu item it inserts it on what ever layer is current in the drawing. That is what I need help with, how do I get this shortcut menu item to go in on the layer(s) it was made with and not the current layer of the drawing. I don't know if this is clear what I am doing or not. Everything works like I want it to, it inserts where I pick, it asks where I want the attributes inserted, asks for the 3 lines of text and ends the command. It just goes in on the wrong layer. I don't see the code button thing to separate the code out sorry Quote Link to comment Share on other sites More sharing options...
BlackBox Posted December 1, 2011 Share Posted December 1, 2011 Marco Macro layers and shortcut menus oh my FTFY Also, SLW gets angry when you don't use [/url]... You wouldn't like him when he's angry. [quote name='S-8-N'] [code] ^C^CSNAP;.025;-insert;C:/Users/rmock/Documents/BLOCKLIST/VARIABLE_IO1A.DWG;\;;;-la;s;av-detl-medm;;-insert;C:/ACAD_Library/_Blocks/wiring_diagrams/equipment_ID;int;\;;;\\\;;;layerp;layerp; As for your question of how to insert the block on the correct layer... go over the sequence of steps again (in your head)... Then look closely at your macro to make sure it (your macro) follows the same sequence. Hint - What should come first, inserting the block, or changing the layer? HTH Quote Link to comment Share on other sites More sharing options...
SLW210 Posted December 2, 2011 Share Posted December 2, 2011 FTFY Also, SLW gets angry when you don't use ... You wouldn't like him when he's angry.[/b] As for your question of how to insert the block on the correct layer... go over the sequence of steps again (in your head)... Then look closely at your macro to make sure it (your macro) follows the same sequence. [color=black] [/color][color=black][/color][color=black]Hint - What should come first, inserting the block, or changing the layer?[/color] HTH Blocks insert on current layer. Maybe there are some LISPs around that do what you want. This is a good reason to use the tool palette, right-click the block on the tool pallette, select properties and set the layer to be inserted on. It even creates the layer if not in the drawing. As the [b]hidden[/b] Hint from RenderMan suggests, set the layer you need the block current, then insert the block. I like right-click myself, but I really do not see the advantage here. Quote Link to comment Share on other sites More sharing options...
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.