Jump to content

question regarding macro to insert a block from a folder location


lldreyer

Recommended Posts

Hi,

 

I am wondering if there is a block insert macro that can let the user choose the block they will insert from a specific folder of drawings.

 

i.e. Rather than:

^c^c_.insert;"C:/pathname/blockname.dwg";

I'm looking for something more along the lines of

^c^c_.insert;"C:/pathname/";

(but that doesn't seem to work)

 

Or, my other idea -- is there a way to use getfiled in a basic macro combined with the insert command?

 

I have a LISP routine set up for my AutoCAD users, but am trying to create a similar functionality for my AutoCAD LT users. And unfortunately I don't know much about macros.

 

Thanks in advance for any suggestions! :)

Link to comment
Share on other sites

Edit: Congrats on your first post, and welcome to the forums!

 

Try using a tilda "~" in lieu of the filepath. :wink:

 

^C^C^P._insert;"~";

 

 

Edit: Macros can be written using DIESEL, or LISP... You could also use getfiled, to set specific parameters (i.e., default directory, and .dwg file extension) if desired.

Link to comment
Share on other sites

  • 2 weeks later...
I am wondering if there is a block insert macro that can let the user choose the block they will insert from a specific folder of drawings.

 

Is the location of the block in your "support file search path"?

 

How is that relevant to the OP's request..? :?

 

Admittedly, the Macro I provided does not specify a folder, but instead allows the user to 'navigate' to any folder. The only other way I know how to offer blocks from a specific folder, is to create a Tool Palette for blocks in said folder. Just be sure to add new blocks (those added after you create the Tool Palette) to said Tool Palette. :wink:

Link to comment
Share on other sites

Its far better to have a little picture of your block in a group that you can pick from rather than remembering its name, we use the old fashioned slides in a pull down these are grouped to common objects 200+ blocks 9 menu choices then multi page choice every body here likes it, but the modern way is like Renderman look into tool palletes these can be called from 1 line in a menu.

 

Theres lots of posts about tool palletes

Link to comment
Share on other sites

Yeah, we still have some legacy tools which utilize slides. The problem with slides is this:

 

Slide menus are probably not a good idea going forward. The reason is that slide menus work best with slide libraries and the utility for creating slide libraries has not been updated in over a decade. I haven't even tried to run in on Win7 64-bit so see if it will work or if it is included in AutoCAD installs any more.

 

I would suggest that if your users want icon-based buttons for content, that you use either Ribbon buttons or Tool Palettes.

 

Source: http://forums.augi.com/showthread.php?p=1101435#post1101435

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...