Jkos Posted February 9, 2011 Share Posted February 9, 2011 Hello First time posting to this forum, I am working on AutoCAD 2011 and creating a custom button for my company, I have one problem, does anyone know how to insert a w-block with a macro? Thanks on forehand// Håkan (Jkos) Quote Link to comment Share on other sites More sharing options...
SLW210 Posted February 9, 2011 Share Posted February 9, 2011 Welcome to CADTutor! -insert will use the command line. Then you will need the path to the DWG. Are you trying to insert a Block or a WBLOCK? Quote Link to comment Share on other sites More sharing options...
Jkos Posted February 9, 2011 Author Share Posted February 9, 2011 Thanks for the quick reply, it is a wblock, that is why I can´t use –insert, the button should work even if the drawing have been purge, and –insert asks for a block name and not a path to the block Quote Link to comment Share on other sites More sharing options...
SLW210 Posted February 9, 2011 Share Posted February 9, 2011 Thanks for the quick reply, it is a wblock, that is why I can´t use –insert, the button should work even if the drawing have been purge, and –insert asks for a block name and note a path to the block It works for me, you will need to add an insertion point in the macro, you can use enters for the rest of the entries. Quote Link to comment Share on other sites More sharing options...
Jkos Posted February 9, 2011 Author Share Posted February 9, 2011 Thanks, My bad, you are right SLW210, but when the command did not ask for a path I did not think it would search in the support directory Quote Link to comment Share on other sites More sharing options...
Jkos Posted February 9, 2011 Author Share Posted February 9, 2011 Next question, is there a way to insert a exploded block from the command line? Quote Link to comment Share on other sites More sharing options...
SLW210 Posted February 9, 2011 Share Posted February 9, 2011 Just add explode to the end of the macro, I think that should work. Let me know if it works. Quote Link to comment Share on other sites More sharing options...
ReMark Posted February 9, 2011 Share Posted February 9, 2011 Preceeding the block name with an asterisk explodes the block upon insertion. Ex. - *myblock Quote Link to comment Share on other sites More sharing options...
Jkos Posted February 9, 2011 Author Share Posted February 9, 2011 The * (asterisk) part work the way that I wanted and needed, Thanks for the help Quote Link to comment Share on other sites More sharing options...
ReMark Posted February 9, 2011 Share Posted February 9, 2011 The * (asterisk) part work the way that I wanted and needed, Thanks for the help Lucky guess. A circuit clicked in my main memory bank. SLW210 provided you with most of the help however. On behalf of us both, you're welcomed. Quote Link to comment Share on other sites More sharing options...
Jkos Posted February 9, 2011 Author Share Posted February 9, 2011 One problem solved, 2 arise, do any of you guys have good guide for writing macros? I need the commands that the macro works by, example ; = enter, ^c^c is clering the command line Quote Link to comment Share on other sites More sharing options...
SLW210 Posted February 9, 2011 Share Posted February 9, 2011 One problem solved, 2 arise, do any of you guys have good guide for writing macros? I need the commands that the macro works by, example ; = enter, ^c^c is clering the command line check AutoCAD help files it has a pretty good section on Macros Quote Link to comment Share on other sites More sharing options...
ReMark Posted February 9, 2011 Share Posted February 9, 2011 I pulled my Customization Guide for 2010 and in Chapter 4 (User Interface Customization) there is a section called Create Macros pages 161 to 177. It covers such items as an overview, basics, special characters, etc. Quote Link to comment Share on other sites More sharing options...
rkent Posted February 9, 2011 Share Posted February 9, 2011 WBLOCK is a command name, the file created is a .dwg file. Just clarifying. Quote Link to comment Share on other sites More sharing options...
Jkos Posted February 10, 2011 Author Share Posted February 10, 2011 Thanks guys Quote Link to comment Share on other sites More sharing options...
SLW210 Posted February 10, 2011 Share Posted February 10, 2011 WBLOCK is a command name, the file created is a .dwg file. Just clarifying. Or .dxf , many call the drawings created by the WBLOCK command "WBLOCKS" that is why I mentioned "path to the drawing" and to be certain he was wanting to insert a drawing and not a block. Nice catch though. -insert will use the command line. Then you will need the path to the DWG. Quote Link to comment Share on other sites More sharing options...
Jkos Posted February 10, 2011 Author Share Posted February 10, 2011 You are right SLW210, my boss and mentor in AutoCAD calls it a wblock, and to be realy clear inserting a "wblock" is inserting a dwg as a block Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.