• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Discussion Groups

    AutoCAD LT

    Reply
    Contributor
    Posts: 24
    Registered: ‎04-13-2010
    Accepted Solution

    -insert using Blockname

    221 Views, 4 Replies
    10-12-2012 06:25 AM

    Has anyone used the command -insert -blockname = filename successfully?

     

    What I have tried is:

     

    ^C^C_-insert;"Insulation - 25-50mm"="K:/All Staff Personal Folders/Personal_Charles Edwards/Autocad/Blocks/Detail Blocks/Insulation - 25-50mm.dwg";

     

    Trying to run this I get:

     

    Command: _-insert
    Enter block name or [?]: Blockname="K:/All
    ""K:/All.dwg": Invalid file name.
    *Invalid*

     

    Any thoughts on where I'm going wrong on syntax?

    Please use plain text.
    *Expert Elite*
    Charles_Shade
    Posts: 6,945
    Registered: ‎04-10-2005

    Re: -insert using Blockname

    10-12-2012 09:41 AM in reply to: ChuckEdwards

    Macro's are nothing more than what you can type at the Command Line.

    When you type your path at the Command Line where does it fail? (hint the = sign. :smileywink:)

    This is the same place it is failing in the Macro.

     

    Here's a long example:

    ^C^C-la;_make;BP; -insert C:/Blocks/Dynamic/Dyn_Pl-bp.dwg \;;\_draworder;last;;B

     

    (Excuse the lack of semicolons Dean)

    Regards, Charles Shade             Win8 FAQ
    CSHADEDESIGN|AUTOCAD LT|LT-KB|DYNAMIC BLOCKS
    Please mark Accept as Solution if your question is answered. Kudos gladly accepted.
    Please use plain text.
    *Expert Elite*
    pendean
    Posts: 14,930
    Registered: ‎11-06-2003

    Re: -insert using Blockname

    10-12-2012 12:26 PM in reply to: Charles_Shade

    tsk! tsk!


    Dean Saadallah Blog | Facebook | RSS | Twitter | PINS
    Please use plain text.
    *Expert Elite*
    pendean
    Posts: 14,930
    Registered: ‎11-06-2003

    Re: -insert using Blockname

    10-12-2012 12:35 PM in reply to: ChuckEdwards

    Since you are replacing blocks with the same exact name, why not follow the other rule about block replacement? From HELP:

     

    "Updating a Block Definition: If you make changes to a block file that is inserted in your drawing and you want to change the existing block definition without creating a new block insertion, enter the following at the Specify Insertion Point prompt (following the Enter Block Name prompt):
    block name=
    If you enter = after the block name, the following prompt is displayed:
    Block "current" already exists. Redefine it? [Yes/No] <No>: Enter y, enter n, or press Enter
    If you choose to redefine the block, the existing block definition is replaced with the new block definition. The drawing is regenerated, and the new definition is applied to all existing insertions of the block definition. Press Esc when prompted for the insertion point if you do not want to insert a new block into the drawing."

     

    Just ensure that path that points to the new block location is in LT's search path (OPTIONS' FILES tab, top entry): if it's not there now, you might have to restart LT after you put it there.


    Dean Saadallah Blog | Facebook | RSS | Twitter | PINS
    Please use plain text.
    Contributor
    Posts: 24
    Registered: ‎04-13-2010

    Re: -insert using Blockname

    10-14-2012 02:12 AM in reply to: pendean

    Thanks Dean,

     

    Now makes sense where I'm going wrong, taking the blockname=filename to be a single statement and not with prompts needing to be dealt with midway.

     

    Charles.

    Please use plain text.