It's the little things that get to us...
So you want to use the new Table Schedule Styles to display information relating to you exhaust fans, and one of the columns is for Motor Power, listing Voltage and Phase. No big deal right? Until you say that you want to show it with a dash...
- 115/1
- 208/3
- 460/3
Well, this is an annoying problem.
When you create a List using Content Builder, and add these Power options to the List, any item in the List that has a "/" in it will not work. This is a problem with AutoCAD, but fear not... there is a work around.
This method of using a Formula Definition can be used in many areas. Anytime AutoCAD is not giving you what you want, give these methods a shot. If it still doesn't work, whine.
Here is a screenshot showing the MoterPower Property of an Exhaust Fan, set to the type of "List":
The first step is to get rid of those "/"s and replace them with a character that AutoCAD will except. For this example, I will use a "-". So our List becomes:
- 115-1
- 208-3
- 460-3
Here is a screen shot showing the Edit List Values dialog box:
As you can see, you can input the "/"s, but once the mvpart is regenerated, it will not work. What we need to do is create a Formula that will Convert the value from a "-" to a "/".
- Create a new Property Definition (type: Fomula, the one with the lightning and 2+4)
- Name it "PowerConvert"
- Use an "if" statement to convert the text:
If [MotorPower] = "115-1" Then
RESULT = "115/1"
Here is a screenshot showing the entire formula:
Note that you could add as many power conversions as you need, just by adding more ElseIf lines. After creating this formula, and then saving the Definition, we want to insert one of the Exhaust Fans and create a schedule for it.
Here is a screenshot showing the Exahust Fan being inserted into the drawing, with the Power selected to be 208-3:
In the Schedule Table Style, when adding the Column for the power, instead of adding the Column using the Definition named "MotorPower", we want to use the Formula Definition we just created, called "PowerConvert".
Here is a screenshot showing the final outcome, with the Value correctly display with a "/" instead of a "-":
2 comments:
If you want more flexibility you can use the function Replace.
Replace( "[Property]", "-", "/" )
Brilliant! Nice and clean, I like it!
Post a Comment