ALUX Posted May 8, 2012 Share Posted May 8, 2012 I'm trying to come up with a macro that will create a "solid" layer and move the current drawing to that layer. My macro already creates a solid layer, solprof, explode, overkill, purge, pedit and join, and toggles back to model layer. So we need to move the model first with very few characters (approaching the limit). This is what my macro looks like so far: ^C^C._SolProf;\;_N;_Y;_Y;;;^C^Cexplode;\^C^C-overkill;_ALL;;;^C^C-overkill;_ALL;;;^C^CPurge;_ALL;;_n;^C^Cpedit;_Multiple;_ALL; _Y;_join;_Jointype;_both;0.001;^C^C^Csetvar;tilemode;$M=$(!=,$(getvar,tilemode),1) Quote Link to comment Share on other sites More sharing options...
ReMark Posted May 8, 2012 Share Posted May 8, 2012 You should use the command line version of the Purge command and probably throw in an Audit to clean up any errors while you're at it. AutoCAD 2012? Why aren't you using the VIEWBASE command instead of SOLPROF to create your 2D geometry? Quote Link to comment Share on other sites More sharing options...
nestly Posted May 8, 2012 Share Posted May 8, 2012 ... does VIEWBASE actually create any geometry that can be moved, copied, or shared between drawings? (rhetorical) Quote Link to comment Share on other sites More sharing options...
ALUX Posted May 8, 2012 Author Share Posted May 8, 2012 Version 2011. No VIEWBASE command. How do you move the part from layer 0 to the recently creates "solid" layer? ^C^C-layer;M;Solid;C;7;;;^C^C._SolProf;\;_N;_Y;_Y;;;^C^Cexplode;\^C^C-overkill;_ALL;;;^C^C-overkill;_ALL;;;^C^C-Purge;_ALL;;_n;^C^Cpedit;_Multiple;_ALL; _Y;_join;_Jointype;_both;0.001;^C^C^Csetvar;tilemode;$M=$(!=,$(getvar,tilemode),1) Quote Link to comment Share on other sites More sharing options...
ReMark Posted May 8, 2012 Share Posted May 8, 2012 Your profile says AutoCAD 2012. When you purge you should do it twice. First time is just for Regapps. Second time is for All. Quote Link to comment Share on other sites More sharing options...
nestly Posted May 8, 2012 Share Posted May 8, 2012 Version 2011. No VIEWBASE command. How do you move the part from layer 0 to the recently creates "solid" layer? I'm not very familiar with Solprof, but I assume that it creates the block on the current layer, so how about setting your new layer current in the macro before executing Solprof? Quote Link to comment Share on other sites More sharing options...
Dadgad Posted May 9, 2012 Share Posted May 9, 2012 Welcome to the forum. Solprof is a great command. It will create 2 blocks (unless you choose to not show hidden lines) which will be on their own separate layers. One of those will be prefixed with PV that will be your block containing all of the visible lines. The other new layer which will be created will be prefixed with PH and that block contains all of the hidden lines. I separate the 2 blocks by a known distance before exploding and overkilling them. At that point I select all of the HIDDEN lines and using my quick properties palette change their layer to STEEL HIDDEN, and their draw order to the back. Having done the same things to the VISIBLE lines, I then put them on the STEEL layer and set their draw order to front. I then reposition whichever of the blocks was moved away back the known distance so they are in the correct place. You can change the layers using LAYMRG if you want. If you do it that way the PV and PH layers will be deleted after their respective contents have been moved to the appropriate layers. FYI there is no need to run overkill 2 times, one will do it, and if you use the FUZZ VALUE of zero, the default, you will be fine.. Quote Link to comment Share on other sites More sharing options...
ReMark Posted May 9, 2012 Share Posted May 9, 2012 ... does VIEWBASE actually create any geometry that can be moved, copied, or shared between drawings? (rhetorical) Not to my knowledge. Quote Link to comment Share on other sites More sharing options...
SLW210 Posted May 9, 2012 Share Posted May 9, 2012 I have moved your thread to the The CUI, Hatches, Linetypes, Scripts & Macros forum. Please read the CODE POSTING GUIDELINES and edit your posts! Quote Link to comment Share on other sites More sharing options...
BIGAL Posted May 10, 2012 Share Posted May 10, 2012 Re to long your macro in two words can be as long as you like. script mycleanupmacro 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.