Community
AutoCAD LT Forum
Welcome to Autodesk’s AutoCAD LT Forums. Share your knowledge, ask questions, and explore popular AutoCAD LT topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to insert one block from another drawing in commandline

10 REPLIES 10
SOLVED
Reply
Message 1 of 11
BriHecato
14971 Views, 10 Replies

How to insert one block from another drawing in commandline

I'm looking for way to insert only ONE block from another drawing into current drawing.

All i find is that I can -INSERT whole drawing but it is not the solution.

 

I want commandline string that I can use with AutoHotKey

 

I don't want to use toolpallette because:

- cannot shortcut to that button with my block

- pallette takes place on the screen

- when I dock pallette and properties to size it's keep on resizing which any open file and it's annoying!

 

It could be a macro like ^C^C ....  that I set with custom button on the ribbon.

 

LISP doesn't work with LT

10 REPLIES 10
Message 2 of 11
steven-g
in reply to: BriHecato

You can't directly, but if you make sure the drawing with your blocks is in a folder on the support path (Autocad options - Files - Support path) then this Macro should work, it inserts the drawing then imeadiately deletes it but now the block definitions are in your drawing, so you can insert the single block, you could always purge after that to remove the other block definitions if you wanted.

^C^C^C-insert;library.dwg;0,0;;;;erase;l;;-insert;NamedBlock;\;;

 And if you don't want/need to have the folder on the support path then you can always add it into the macro (you just need to use forward slashes)

^C^C^C-insert;"D:/Autodesk support/dwg two/library.dwg";0,0;;;;erase;l;;-insert;NamedBlock;\;;
Message 3 of 11
BriHecato
in reply to: BriHecato

Too bad.

 

Inserting whole file and erasing what have been inserted only to reinsert one block is stupid.

 

Then I need to purge unnecessary elements manually, because auto purging can purge too much....

Message 4 of 11
steven-g
in reply to: BriHecato

You don't actually see any of the other stuff, it just makes it "available". running the macro takes a split second and all you have visible is the ONE block that you want. And as for the purge part it is only for good houskeeping and can be added to the end of the macro, so no need to manually do anything.

There is no command for getting information from other drawings. Or you could use the design center and create a toolpalette from all your blocks in the other drawing and insert them using the toolpalette.

Message 5 of 11
BriHecato
in reply to: steven-g

Yes they're invisble but still there. We could say that I am a "Mad Purger".

 

I'm currently using custom tool pallette but I'm not satisfied with it. Before it I was using Design Center.

 

Digging this topic I've come across inserting layouts that can have blocks - need to look closer to this solution.

 

Thank You for your time Steven-g

Message 6 of 11
steven-g
in reply to: BriHecato

It does seem odd that it is possible using design center to create a simple button on a toolpalette that inserts an item from another file, but there is no way to do it directly, if you look at the properties of such a toolpalette it appears as though it uses the insert command with the option to have a named block that is contained in a drawing. It would be nice to have that as a built in option for the insert command, but it isn't. That way you could also build a ribbon or menu command for inserting library blocks.

The only method you would have at the moment, is to save all your blocks as individual dwg files, at least then you could do what you are trying to achieve.

Message 7 of 11
Anonymous
in reply to: steven-g

I found a solution from that.

If I understand it well, you want to import a block from another drawing into the current drawing?

 

Read & try this: http://www.cadforum.cz/cadforum_en/how-to-insert-a-block-from-another-dwg-file-tip10173

 

For me, it works like a charm.

Add this file into your autocad program files, command 'appload' this file and then command 'insertx', search your drawing and select the block you want to import.

 

Good luck!

Message 8 of 11
steven-g
in reply to: Anonymous

This is the LT forum there is no LISP in LT and therefore no appload 

Message 9 of 11
Anonymous
in reply to: BriHecato

I use command "ADCENTER" and re-direct the folder list to the file that contains the block. Once you click the file, you choose blocks and from there, all the blocks saved under that DWG are shown on the side. You just simply drag and drop the block inside your current drawing.

I have a file saved in the "C:\Program files\Autodesk\Autocad\Sample\en-us\DesignCenter" folder where I save all my blocks for all my drawings, and they're always readily available in each of my drawings. You can save your blocks in different DWG's, like, Electrical, Plumbing, Furniture, etc. and save them to the above folder to find them quicker. I relized I cannot save directly to that folder, so what I do everytime i update or add a new block I save it in MyDocuments and cut and paste to replace the existing file. Maybe someone can elaborate on how to save to that folder.

Note: I wonder how many people use "ADCENTER". I've talked to a lot of drafters that had no idea this existed.

Message 10 of 11
BriHecato
in reply to: Anonymous

Finally, I prepare an AHK script that load selected layouts for a "template" file with the necessary blocks in one of the layouts. Than another AHK hotkey to quick insert.

Message 11 of 11
Anonymous
in reply to: Anonymous

Works perfectly. Thanks

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost