September 04, 2010

Hatch Editing With Grips - 2010 & Later

Here is an AutoCAD® feature that has been around since the 2010 release, and now that I am using that in the office, I thought it worth a mention, given how easy it makes updating non-associative hatches - even those created in previous releases. Given the problems associative hatches can have when an external reference or an AEC object is part of the boundary (when opening the file, the hatch often tries to resolve itself before all of the bounding objects have been loaded and resolved), I had taken to drawing polyline boundaries on a non-plotting layer and making hatches associative to that, so that I could edit the boundary easily should the area of hatch need to be changed in the future. Having been on the 2004 release for quite some time for production work, I was not able to take advantage of the ability to generate a boundary of an existing, non-associative hatch and make the hatch associative to it. The new grip editing feature makes this additional step unecessary.

To demonstrate the grip editing feature, I have created a square, non-associative hatch (and deleted the original bounding polyline), and drawn another polyline, to which I will extend the hatch, using grip edits.
Selecting the hatch reveals a number of grips. The center grip allows you to move the entire hatch, and was present in releases previous to 2010. The Vertex and Edge grips are new in 2010 (and are also present in 2011). ACA users should be familiar with hovering the cursor over a grip to get a tooltip, possibly listing options, and that technique works here as well.Hovering over a square grip at the perimeter of the hatch (Vertex) reveals that selecting that grip will allow you to initially move the Vertex to a new location, and pressing the CTRL key will cycle to the Remove option, allowing you to delete the Vertex.Hovering over a rectangular Edge grip on a straight segment at the hatch perimeter shows that the intial action on selecting the grip will be to add a new Vertex, and that pressing the CTRL key will cycle to converting that Edge to an arc.Hovering over the rectangular grip of an arc Edge of a hatch indicates that the initial action is to stretch the arc and that you can use the CTRL key to cycle to add a new Vertex and then to convert the arc to a line.

ACA users that have used grip edits on AEC objects will have to remind themselves that the Edge grips can NOT be used to stretch a straight segement, as they can for AEC Polygons.

To make the square hatch fill the drawn polyline with grip editing, use the Move option to relocate the four existing Vertices to Vertices on the polyline.To fill in the remainder, select the Edge grip that is not on a segment of the polyline and use the Add Vertex mode to add a fifth......and sixth Vertex......filling the polyline.
You can, of course, accomplish this simple edit in one step, by selecting the original square hatch, right clicking, choosing Set Boundary from the context menu and then picking the polyline.But in a typical drawing, where you have a lot more linework and, perhaps, several adjoining hatches, and where the linework defining the hatch edges is not a single polyline, I have found grip editing of hatches to be a very useful feature, and one that has virtually eliminated the need to delete an existing hatch and then rehatch the area.

August 18, 2010

Revit - Wall Openings and Room Separation Lines

Interesting Observations to Keep in Mind in the Future [based on the Wall having a Base Offset of 0 (zero)]:

  1. A Wall Opening with a Base Offset of 0 or less (extends to the Wall's bottom or below) renders that Wall incapable of acting as a Room separator. In other words, the Room will extend through the Opening in search of bounding elements beyond (left opening in the images below).

  2. A Wall Opening with a non-zero, positive Base Offset will act a Room separator, even if the top of the Wall Opening is at or above the top of the Wall or if the Room's Base Offset puts the bottom of the Room above the bottom of the Wall Opening (right opening in the images below).

    So, it would appear that the condition at the associated Level is what determines whether or not a Wall Opening will allow a Room to pass through or not.

  3. Adding a Room Separation Line to close the breach and having the endpoints of the Room Separation line at an edge of the Wall Opening disables the stretch grip at that edge and also prevents that edge from working with the Align tool. (If both ends of the Room Separation Line are at the edge of the Wall Opening, then neither stretch grip is available and neither edge can be Aligned.


  4. Stretching the Room Separation Line beyond the extents of the Wall Opening allows the Wall Opening end to be grip edited or Aligned, but will result in warnings about the overlapping Wall and Room Separation Line. If those warnings do not bother you, you can leave the Wall Separation Line beyond the Wall Opening until you are satisfied with the location of the Wall Opening.

  5. Selecting the Wall will display a "Disallow Join" grip at each edge of the Wall Opening. Clicking on one of those grips will reactivate the stretch grip and the ability to Align that edge. Doing so, and enlarging the Wall Opening will allow Rooms to flow through, so you will also need to extend the Room Separation Line if you want to prevent the Room(s) from passing through.



So, in order to edit the width of a Wall Opening that has a Room Separation Line with an endpoint on the Wall Opening edge you wish to move, you either need to stretch the Room Separation Line to get the endpoint off of the Wall Opening Edge -OR- you need to select the Wall, "disallow join" at that edge using the "Disallow Join" grip. If you can easily stretch the Wall Separation Line to get its endpoint at the desired new location of the Wall Opening edge, then doing that and then editing the Wall Opening would be the least tedious way to proceed. If not, either method should work; use the one you prefer.

August 14, 2010

Hatching in 2011

Thanks to a heads up in this post on Steve Bennett's blog, I am now aware that the default setting for island detection has been changed from Normal to Outer, as can be seen on the Hatch Creation contextual ribbon tab, on the flyout of the Options panel, on the Island Detection drop down list.

Outer will only hatch the outermost area, ignoring any "island" areas.

The former default value, Normal, will hatch the outer area, skip the "first" island but then hatch a "second," nested island, and alternate the hatching of additional nested islands, if any.

The default value for island detection is stored in each drawing, and can be changed in several different ways. While in the HATCH or BHATCH command, on the Hatch Creation tab, or on the Hatch Editor contextual ribbon tab when selecting a Hatch object, you can expand the Options panel and use the Island Detection drop down list to choose your preferred value.You can also use the Hatch and Gradient dialog, accessed while in the HATCH or BHATCH command by using the seTtings option or by clicking on the Hatch Settings tool on the Options panel.On first use, the Hatch and Gradient dialog will be collapsed, and the Island Detection options will not be visible.Click on the arrow icon in the lower right corner to expand the dialog and expose the Island Detection area.To set the value directly, set the value of the HPISLANDDETECTION System Variable as desired:
0 = Normal
1 = Outer
2 = Ignore

Reset the default value in your template file(s) if you want the initial value in new files to be something other than Outer.

August 13, 2010

Facelift

After nearly six years, I decided to revise the template for this blog, converting to Blogger's newer Layout templates from my old "classic" template. I hope you enjoy the change.

August 11, 2010

Running Slowly?

Various suggestions have been made over the years in the Autodesk Discussion Groups and the AUGI Forums for dealing with AutoCAD® Architecture running more slowly than normal. Here are a few things that I have found are helpful in that situation.

  1. Bad Shortcuts: If you have a shortcut file in the AutoCAD Search Path (as defined on the Files tab of the Options dialog) that point to a non-existent folder or file, every time ACA need to check the search path (more often than you think), it will dutifully keep trying to resolve the bad shortcut until times out. One frequent culprit is the Add-A-Plotter Wizard in the Plotters folder. If you copied your plotters from a previous release and grabbed the Add-A-Plotter Wizard shortcut file as well, and then uninstalled the previous release (or otherwise moved or deleted the referenced program file), you will experience delays while ACA tries to find the missing file.

  2. Bad File Locations: Check the entries for the Search Path and other file locations on the Files tab of the Options dialog, to make certain that all of the folders/files specified exist (in the location given). We had an office standard profile that had network path that referenced the hard drive on a local computer. (Don't ask me, I did not set it up.) So long as that computer was logged into the network, all was well. As soon as it was logged off, things slowed down, while waiting for the search for that file/path to time out. It took a while for me to realize that the speed issues I was having only happened after 5:00 pm, and it was only after I found the improper pathing that I understood why.

August 05, 2010

AU Registration Later This Year

Those planning to go to Autodesk University 2010 who have not spent much time on the AU Online site lately may not be aware that, unlike recent years, registration this year will not open in August but instead will start on September 14.

If you are not already registered at the AU Online site, do so now, and you will be able to register a week early, starting September 7.

July 26, 2010

Frozen Ribbon

No, it is not a new way to beat the summer heat (my apologies to readers in the southern hemisphere, who may be more interested in a way to stay warm, but this has been a particularly brutal summer here in Philadelphia); it is a frequently reported occurrence in AutoCAD® Architecture 2010 and 2011. Often triggered by the use of the MTEXT command, the freeze occurs if you have more than one CUIX file loaded and two or more each have a contextual ribbon tab (such as the Text Editor tab triggered by the MTEXT or MTEDIT commands) that is triggered by the same command or object selection.

This most frequently happens when both the ACA.cuix and ACAD.cuix files are loaded simultaneously, often so that an ACA user can have access to elements in the ACAD.cuix file that are not part of the ACA.cuix file. Unfortunately, loading both as they are, out-of-the-box, will result in having multiple contextual ribbon tabs for the same triggering action.

The solution is to either not load both at the same time, or, if you must have access to items in both, to create a custom CUIX file that has the items you want from the ACAD.cuix file, but does not have the contextual ribbon tabs (or at least not any that overlap those in the ACA.cuix file). You will need to decide whether it is easier to make a copy of the ACAD.cuix file under another name, and remove the overlapping contextual ribbon tabs -OR- set up a new CUIX file and transfer only the items you want/need from the ACAD.cuix file.

July 24, 2010

Revit Training from Paul Aubin via lynda.com

If you are interested in an Internet-based Revit® "Essentials" course that is available any time your are, you may want to look into subscribing to lynda.com, where Paul Aubin has added such a course. According to the website, subscriptions begin at $25.00/month. Premium subscribers (starting at $37.50/month) also get access to exercise files. The class consists of 8:25 of video instruction; you can get more details here.

Your subscription also provides access to training on AutoCAD, 3DS Max, Maya and Sketchbook Pro, as well as many other software titles.

July 20, 2010

Insertion Point of an AEC Object in AutoLISP

If you have ever tried to use AutoLISP to automate a task involving an AEC Object, you may have found that the ENTGET function does not return as much information for an AEC Object as it does for an AutoCAD object. A question posted to the Autodesk AutoCAD Architecture Customization Discussion Group, asking how the insertion point of a Multi-View Block might be obtained in AutoLISP, prompted me to see if I could figure out how to do just that. I knew that the Visual LISP ActiveX (VLAX) functions allowed for direct access to an object's properties. Unfortunately, the amount of time I have available for fun* things like writing AutoLISP code shrank significantly right around the time that the VL/VLAX/VLR functions were introduced, so I have never become proficient with them. Since this task was fairly simple, I thought I would take a shot at it anyway.

Using the 2010 Help (the 2011 Help no longer appears to have the AutoCAD Architecture ActiveX Reference section), I was able to determine that Multi-View Blocks (as well as a number of other AEC Objects) have a Location property that holds the "insertion point" as a variant three-element array of doubles. That means that the value is not pre-declared as a specific data type ("variant") and that it contains an array of three, double-precision real numbers ("doubles"), which is what you would expect to describe a 3D point. From previous experince, however, I knew that I would not be able to just assign that property value to an AutoLISP variable and use it with AutoLISP functions. I scanned through the VLAX functions, and saw the VLAX-VARIANT-VALUE function, the description of which indicated that it would return the value of a variant. That sounded like it was just what I wanted, but I found that for a variant containing an array, the return value was a "safearray", and that was not the simple list of three real numbers I needed. Fortunately, I also found the VLAX-SAFEARRAY->LIST function, which converts a "safearray" to an AutoLISP-style list of three real numbers. This may be less "safe", but it is far more useful when using AutoLISP functions.

The following code is what I posted in reply in the Discussion Group. There is no error checking in the subroutine, so it will crash if the entity name passed belongs to an object of a type that does not have a Location property. I am assuming that the calling routine will only pass entity names of objects that have a Location property; if that is not possible, then the subroutine would need to verify that the passed entity name belongs to a appropriate object type before trying to obtain the Location property. If the subroutine tests for appropriate object type, then a special "alert" return value should be included to inform the calling routine that an inappropriate entity name was passed.
(defun AECINS (ename / ob ptarray ptins)
(setq ob (vlax-ename->vla-object ename))
(setq ptarray (vlax-get-property ob 'Location))
(setq ptins (vlax-safearray->list (vlax-variant-value ptarray)))
)


* - Yes, I suppose it is sad that I find writing AutoLISP code "fun".

June 27, 2010

Selection Cycling

As mentioned in the AutoCAD Improvements section of my AutoCAD Architecture 2011 Overview post, I found the Selection Cycling feature quite handy. Here is a look at how it works.

Activation of the Selection Cycling feature is controled by a new toggle on the Application Status Bar, and the SELECTIONCYCLING system variable. SELECTIONCYCLING is stored in the registry (so is not drawing-dependent) and has three main values, as noted in the online Help:
0 - Off
1 - On (the list dialog does not display)
2 - On (the list dialog displays the selected objects that you can cycle through)

What the Help fails to mention is that the Application Status Bar toggle can introduce two other values:
-1 - Off, but previous value was "1" and, when toggled back on, will reset to "1"
-2 - Off, but previous value was "2" and, when toggled back on, will reset to "2"
If you manually set SELECTIONCYCLING to "0" to turn it off, clicking on the Application Status Bar toggle will set the value to "2".With selction cycling active, when your cursor hovers over a spot where there are multiple objects, you will see an overlapping rectangle icon adjacent to the cursor.With SELECTIONCYCLING set to 1, you will get the legacy behavior for cycling through multiple items near your pick point. As indicated in the online Help:
1. At the Select Objects prompt, hold down Shift + Spacebar. Click as near as possible to the object you want.
2. Keep clicking until the object you want is highlighted.
3. Press Enter to select the object.
Note: If selection preview is turned on, you can cycle through the objects by rolling over the object on top to highlight it, and pressing and holding Shift and then pressing Spacebar continuously. When the required object is highlighted, left-click to select it.

With SELECTIONCYCLING set to 2, a left click will call up the Selection dialog, listing all of the objects that are selectable at the click point, by object type. If you move your cursor over to the dialog and hover over an item on the list, it will be highlighted both on the list and in the drawing.When the object you want is highlighted, a left click on the item in the dialog dismisses the dialog and selects that item. If you decide against selecting any of the offered items, choose None at the bottom of the list.

You will probably not want to have this turned on all of the time, but for those times when you need to select an item in heavy traffic, toggling Selection Cycling on can be quite effective.