Tuesday, June 23, 2009

Legacy VBA Error - For next loop may really mean If end if.

I was updating some legacy VBA code today and had to add some additional logic to a function. When I click the run button, I was faced with this dialog box
A quick check of the code indicates that there IS a closing "NEXT" statement for the "For Each..." loop. When this happens to you, check any "If...." logic constructs within the "For ... Next" loop. Chances are you'll find a missing "End if" statement.

Labels: , , , , , , , , , ,

Thursday, June 11, 2009

Revit Tip - Fillet with Radius

New Revit users are constantly tripped up by the ghost of AutoCAD past! It may seem logical to think that the fillet with radius command would be an editing tool in any software package. After all, the default Trim tool in Revit does a Fillet Corner for pete's sake! Rather than delete the wall and draw a new one with the "Radius" option toggled on, try this:




  1. Right-Click one of your walls and choose "Create Similar" to launch the Wall tool using the correct family.

  2. Click your Sketch Options pull down and pick "Fillet Arc" and then immediately pick your two walls.

  3. Now graphically stretch the arc into size.

You could toggle on the Radius option, but why not draw and then modify? It's all about iteration after all!




Labels: , , , , , , , , ,

Friday, May 08, 2009

Get the AU Online Code!


Many of you have attended Autodesk University and know the value of this fantastic training and networking event. But I know that many of you don't get an opportunity to attend for many reasons. Since I have access to the training materials, I thought I would share the code with those who've never attended.

Here's the deal: Send me an email stating why you want to experience AU through the online portal. I'll select five people and then send them a link that will let them register and gain access to the thousands of classes, handouts, and screencasts. Don't delay. This deal expires on June 1st, 2009.

Labels: , , , , , , , , , , ,

Sunday, April 05, 2009

AUGI Member Exclusive Download - AutoCAD 2010 Tips-n-Tricks Booklet by Lynn Allen










AUGI Members Only Exclusive!

You all know the value of Lynn Allen’s Tips and Tricks. You know that she has saved you tons of time and effort. Now Lynn Allen, Autodesk technical Evangelist and AUGI Sweetheart, is offering an exclusive to our members. A sneak peek at the AutoCAD 2010 Tips and Tricks.

That’s right – before anyone else gets to see them, Autodesk is allowing AUGI members an exclusive downloadable version. This PDF download is stuffed with the best of the best from Lynn. You have used them in the past and they have made you more productive. Get the latest in a long stream of helpful hints directly from Lynn to AUGI members. You must be a member to download the booklet.

If you're not an AUGI member, be sure to sign up today! Membership is free. Once you're a member, you can download the booklet!


Visit the AutoCAD Community to download a copy now! - http://forums.augi.com/showthread.php?t=98905

Better yet – download your preview copy, then go see Lynn and the tips live and in action at the Autodesk Imagine Tour at a city near you. You can get a hardcopy of the handy booklet at the event.

Join informative sessions, including Take Design Further: Lynn Allen's AutoCAD 2010 Tips & Techniques, and learn how AutoCAD 2010 delivers groundbreaking new capabilities to tackle the most challenging design problems with ease. In addition, you'll see our range of solutions in action in our industry sessions, including design and intelligent modeling solutions such as Autodesk® Inventor® software, Revit® software, AutoCAD® Map 3D software and Autodesk® 3ds Max® software.

www.autodesk.com/imagine

Want more? Visit Lynn's blog for even more tips… www.autodesk.com/lynnallen

Labels: , , , , ,

Friday, February 27, 2009

ACA 2009 VBA Macro - Room Zoom Available


R2009Find_Room_Zoom2.dvb is a VBA Macro that displays a modeless userform on the screen with a text box and a button labeled "Find". When you enter a room or space number in the text box and click the "Find" button, it will cycle through all the available space/room objects in the current drawing and any attached xref files and zoom your display to center on that space or room with the corresponding number. This macro originated in Autodesk Architectural Desktop (ADT) R3.3 and is now updated for Autodesk AutoCAD Architectural (ACA) Release 2009.

Take a look at the code within the macro to see how to:


  • Use the acfocus control (allows you to keep the form visible on the screen while you interact with entities within your file.

  • Find the schedule property and get the associated space or room object.

You'll find more helpful utilities in past posts here and at AUGI.com, R U a Member?

Labels: , , , , , , , ,

Wednesday, October 08, 2008

AutoCAD Architectural Schedule Formula Tip

Problem: Schedule Formula (simple area addition) does not display as intended.

Solution: Check your format for the underlying property set variables.

Image

As you can see from the image above, the combined area of two properties is not displaying as intended. What can I do to get a simple sum that displays in square feet? Here is the executive summary.

1.) Verify that your Schedule Cell format is set to Area.
2.) Now check each variable in the formula and scroll to the right setting their format to "standard" instead of area as shown in the following image.

That's it! Your Problem is solved!

Image

Continue reading below for the step by step version.

Step by Step:
Step 1: Select your schedule table, right click your mouse and choose "Edit Schedule Table Style..." from the pop up menu.


Image
Step Two: When the Style Editor dialog box appears, navigate to the offending column and select it by left clicking with your mouse. Now move your mouse to the "Modify..." button at the bottom of the dialog box and left click it with your mouse. Now find the sample values list area indicated by #3 in the image below and left click and hold your mouse button down while sliding your mouse to the right. When you can see the format column you can let go of the mouse and continue to the next step.


Image
Step Three: Double check that your chosen data format is "Area" for the Column Properties as shown in #1 in the image below. Next move your mouse back to the sample values list and change the format value for your variables to "standard" from "Area" as shown in the image below next to #2 and #3 in the image.


Image
Step Four: Left Click the "OK" button and verify that your schedule updates to display as shown below. You did it! Congratulations!


Image

Hope that helps!

Labels: , , , , ,

Tuesday, September 23, 2008

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.

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)"

Labels: , , ,

Wednesday, January 09, 2008

The January Fix for REVIT Products is In...under the radar!

Looks like the fix for problems associated with the Jan 2008 bug are now available. Had problems recently opening older files? Trouble editing schedules or groups?...Install the latest build 20080101_2345 to fix these problems and more! It is definitely time to upgrade and install the latest Revit Builds! Learn about and download the latest builds using the links below.

Click on the Web Update Enhancement List links below to read about the changes and fixes provided in the latest builds.

Want to download the latest English builds directly? Get it/them at Autodesk by clicking on these links:

Don't forget to read up on the content changes. I'll include this important reminder until the next full release.

Thank You Autodesk for understanding the need to release all the disciplines tools at the same time!...

Labels: , , , , , , , ,

Monday, January 07, 2008

Layer Set by Pick Lisp

Looking for a quick way to set a layer active? Why not pick an object that already exists on that layer! The following lisp code does just that!

(defun c:ls ()

(while (not e) (setq e (entsel))) ;get layer of item picked

(setq lyr (cdr (assoc 8 (entget (car e)))))

(command "-LAYER" "set" lyr "") (setq e nil)

)


Labels: , , , ,

Thursday, January 03, 2008

Use VBA to detach unloaded External References (XREFs)

Often when archiving or sending files to consultants, it is desireable to do some house cleaning prior to transmitting them. A common practice in cases like these would be to detach any unnecessary XRefs. And what is more unnecessary than a previously unloaded xref?


Public Sub DetachUnloadedXrefs()
Dim o_Blk As AcadBlock
For Each o_Blk In ThisDrawing.Blocks
If o_Blk.IsXRef And o_Blk.Count = 0 Then
ThisDrawing.Utility.Prompt o_Blk.Name & _
" is an unloaded xref and has been detached." & vbCrLf
o_Blk.Detach
End If
Next
End Sub


Hope you find that useful.

Labels: , , ,

Tuesday, November 13, 2007

Updated for 2008: Routine to Copy Layer Keys Between Layer Key Styles

Need to migrate your layer keys in AutoCAD Architecture 2008? I updated the routine to work in 2008. Get it here.

Labels: , , , ,

Wednesday, February 07, 2007

Mindmapping to Create Handouts

I have to admit, I've gotten away from my use of MindManager over the last few months. I got busy and forgot how this tool really helps to streamline development. After seeing fellow AUGI board member, Steve Stafford, use it to generate his AU handouts during our recent board meeting I realized that I was wasting time not taking advantage of this tool.

Yesterday, I realized that I had to set aside some time to develop a handout for a training class today. I knew that I was going to use MindManager to get the job done. I started by quickly organizing my thoughts in brainstorm mode and then completed the initial skeleton of the document as shown in the following image.



Taking the initial nodes, I utilized the notes pages for each topic to layout the meat of the handout including images, bullets, and text. Being able to quickly drag nodes to new branches and reorganize on the fly really sped up the process.



After completing the MindMap, I used the built in Saveas to document feature, pointed my new map at an existing Word template and quickly published a nine page handout to Word. I'll use this tool for every handout I create from now on.

Labels: , , ,