Other Modemacro goodies

The recent LT Unlimited blog article by Kate Morrical titled: “Customize the Status Bar with MODEMACRO” reminded me of some customization I recently wrote. I received a call from a remote architect who needed some assistance with Linetypes. She was concerned that when switching from model to paperspace her linetypes weren’t always displaying correctly.

The therapy involves exploring her feelings about buy discount viagra sex, helping her gain an insight into her relationship with her partner and also about herself. Find out more viagra online on the net through viagra. Patient can choose the flavor based on buy viagra without their taste. You arebasically spoiling the benefits of Power Khan- one of the bestErectile Dysfunction Treatments.* Taking a hot bath or sauna after taking Power Khan may giveyou a headache & hot flushes over your body.* Do not take more than 1 sachet in 24 hours. viagra canada

I explained that she should be adjusting her ltscale variables in order to see the linetypes when in modelspace. She wished for an “automatic solution”. So I wrote a quick macro, using VBA, to automatically set the correct lt and psltscale values based on the current value of dimscale. I tied the macro to the AcadDocument_LayoutSwitched event so that whenever she switched layouts, the macro would update the values.

To provide graphic feedback that this system was working I chose to use the MODEMACRO system variable. Here is the macro in action with visual feedback occuring on the status bar.

Here is the code from the vba macro that sets the MODEMACRO variable. You can see from the code snippet below, that I am displaying the current value of the MEASUREMENT, DIMSCALE, LTSCALE, and PSLTSCALE variables.

ThisDrawing.SetVariable “modemacro”, “WB_STATUS- UNITS: $(IF, $(=,
$(getvar,MEASUREMENT),0),IMPERIAL,METRIC) SCALE=$(GETVAR,DIMSCALE)
LTS=$(GETVAR,LTSCALE) PSLTS=$(GETVAR,PSLTSCALE)”

Leave a Reply