I'm trying to swap the pattern of a region in some of our files, but every time I use the Change Pattern tool it only gives me what I set in the Hatch Area tool, not the Pattern Area tool.
The regions we're dealing with are exported to dgn format from another design software that has a very limited set of patterns. Currently, they're being exported as parallel lines @ 45° and I'd like to swap these regions out with the AR-CONC AutoCAD pattern (which does not exist in the source software). Any suggestions on best way to do this?
In MicroStation, Hatch and Pattern are different tools and different elements, and you can't swap between them. If you want to change a pattern, you need to have used an actual pattern previously. I do believe there are patterns that resemble a diagonal hatch - you would be able to choose one of those and then swap it for another pattern. If you have the pattern boundary, you can use "Delete Pattern" to remove the Hatch, then pattern it with whatever you want to use.
It's possible your source software isn't capable of exporting an actual patterned area, and is exploding whatever pattern it is using on conversion. Is it giving you a diagonal line hatch, or actual individual diagonal lines?
No, opening the exported file in OpenBuildings shows that it's an associative region, so it's definitely getting exported as a Hatch, not converted into plain lines. I had a hunch about the swapping when the Change Pattern tool just updated the settings per the Hatch Area tool, but was holding out hope there was something I was missing.
We're working in OpenBuildings, but we need to use another disciplines backgrounds, and their work is done in the other software. We were hoping to be able to automatically hatch new vs existing elements, but automation may not be in our future.
Is there possibly a way you might be aware of, with key-ins or possibly through macros, to swap between them or worst case detect them, delete existing hatches, and create patterns in their place? My goal is to not place it all manually, considering things are still changing and tracking and verifying those changes manually is time consuming.
Nothing quick and easy off the top of my head.
VBA could be an option if you have to do this on many drawings. Even easier if the logic is consistent every time. VBA is relatively simple to code once you figure out the logic of what you are doing, and familiarize yourself with a handful of "basic" tools (element enumerator to sort through elements, for example). There are a number of options for "HasPattern" (is there a pattern), "GetPattern" and "SetPattern" for the parameters, "RemovePattern". This one has example code in the VBA Help to remove a pattern from a closed element, and you could probably add lines into that to place a pattern onto the same element. There is also a code sample for crosshatching an element that shows how to pattern an element with "SetPatternWithOrigin" (which works with AreaPattern, CrossHatchPattern or HatchPattern). Figure out the code to filter to find your patterned elements, and that's most of what you need.
Alright, thanks for the input!
I will look into VBA (I've used it before in Excel, so would just be a process of learning the API for OBD specific commands), but I may opt for a manual process for now. Not ideal, but something we can certainly work with if we have to.