Jump to content

Custom macro help!


Recommended Posts

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)

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

... does VIEWBASE actually create any geometry that can be moved, copied, or shared between drawings? (rhetorical)

Link to comment
Share on other sites

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)

Link to comment
Share on other sites

Your profile says AutoCAD 2012.

 

When you purge you should do it twice. First time is just for Regapps. Second time is for All.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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..

Link to comment
Share on other sites

... does VIEWBASE actually create any geometry that can be moved, copied, or shared between drawings? (rhetorical)

 

Not to my knowledge.

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...