AutoCAD LT General Discussion

AutoCAD LT General Discussion

Reply
Distinguished Contributor
ChuckEdwards
Posts: 113
Registered: ‎04-13-2010
Message 1 of 5 (371 Views)
Accepted Solution

-insert using Blockname

371 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?

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.

*Expert Elite*
Charles_Shade
Posts: 8,204
Registered: ‎04-10-2005
Message 2 of 5 (355 Views)

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.
*Expert Elite*
pendean
Posts: 23,640
Registered: ‎11-06-2003
Message 3 of 5 (348 Views)

Re: -insert using Blockname

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

tsk! tsk!

Dean Saadallah Blog | Facebook | Google+ | Twitter | PINS
*Expert Elite*
pendean
Posts: 23,640
Registered: ‎11-06-2003
Message 4 of 5 (346 Views)

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 | Google+ | Twitter | PINS
Distinguished Contributor
ChuckEdwards
Posts: 113
Registered: ‎04-13-2010
Message 5 of 5 (320 Views)

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.

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.