Macro: Inserting a block from a specific location

Macro: Inserting a block from a specific location

Anonymous
Not applicable
1,020 Views
1 Reply
Message 1 of 2

Macro: Inserting a block from a specific location

Anonymous
Not applicable

Hi all,

 

Trying my hand at macro creation and many have been successful so far.

 

I'm trying to create a macro where a block is inserted from a specific folder, for example, when activated, the macro directs the user to a 'parent' folder, where they then have to select the 'child' folder which contains the block - to be inserted as a block (ideally exploded on input)(or inserted/attached as an xref?). 

 

^C^C^P._INSERT;"~" 

 

The above works as a macro to insert a block, but I'm wondering if you can already complete the first portion of the path / folder location so that it always opens to the parent folder. Otherwise there are 4/5 folders which you need to go through first before getting to the parent folder, which isn't the end of the world but it would speed things up a bit. 

 

I'm working on AutoCAD but the other users will be using AutoCAD LT - so I can't use LISP routines. 

 

I have also tried adding the parent folder location to the trusted file locations, but this hasn't helped. 

 

Any help would be appreciated! 

 

J

0 Likes
1,021 Views
1 Reply
Reply (1)
Message 2 of 2

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

not sure and no chance to test this now, so please see that as idea that might help or might fail:

start the insert command twice, one time for a block you know in the destination folder (like "C:/TEMP/Blocks1/dummy.dwg", insert it e.g. at 0,0,0), then delete the dummy-block (last object), then start again _-INSERT ... it could be that now "C:/TEMP/Blocks1" is the active folder when you open the file-dialog ...

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes