AutoCAD Architecture Forum
Welcome to Autodesk’s AutoCAD Architecture Forums. Share your knowledge, ask questions, and explore popular AutoCAD Architecture topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Schedule formulas convert from decimal to feet, inch

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
r_swift
2393 Views, 3 Replies

Schedule formulas convert from decimal to feet, inch

Hello,

 

Creating  a window schedule and trying to add two columns together, one column is [width] automatic, want to add 3" to the width column using a formula column. When added result is a decimal number, want to convert to ft, inch format.

 

Example: Width column = 3'-0", Formula column (Header), Formula used: ([width] + 3)/12) Result 3.25 standard formatting. Want to convert to 3'-3".

 

Using ACA 2008 student addition.

 

Thanks

 

Rob

3 REPLIES 3
Message 2 of 4
David_W_Koch
in reply to: r_swift

I would have attached a sample file, but I do not have access to a version that uses the 2007 format any longer.  So you will have to get by with the attached image, from the 2014 release.  I am fairly certain that things have not changed significantly since the 2008 release, so you should be able to do what I did.

 

On the left half of the image, is a screen capture of the Modify Formula Column dialog, which you get to by editing your Schedule Table Style (one way - use Style Manager).  On the Columns tab, select your Formula Column, and then select the Modify button.  To get feet and inches format on your Schedule Table, you will need to make certain you have done the following:

 

1.  Assign a Property Data Format to the Formula Column that shows real numbers in imperial architectural units.  For my example, I used the out-of-the-box Length - Long Property Data Format.  (See #1 in the image.)

 

2.  Even with the above, whole numbers will be interpreted as integers, and the real-number formatting will not be applied.  To force ACA to interpret a whole number result as a real number, use the CDbl VBScript function, as shown at #2 in the image.

 

3.  If you were not getting errors, you probably have already done this step, but in the interests of completeness and for the benefit of others reading this thread, in order for the formula to be able to take the Window width value (in the example, as generated by the out-of-the-box WindowObjects:Width(Auto) property) and use it in a mathematical expression, the property has to provide a real or integer value, without any text formatting, such as you would get with the Length - Long Property Data Format in an imperial drawing, which is what is assigned to the WindowObjects:Width(Auto) property in my example file.  Rather than change the Property Data Format assigned to that property to a numeric-only format (like the out-of-the-box Standard Property Data Format), I used the Enter Sample Values area of the Modify Formula Column dialog to override the assigned format and set it to Standard.  This gives me an unformatted numeric value to which I can add 3 in the formula, and then force the result to be a real number even if the result has no fractional amount, as noted in #2 above.

 

The right half of the image shows a Wall with some Windows of varying length, to which I attached my WindowObjects property set.  An instance of my test Schedule Table Style is placed below the Windows, each of which is part of the selection set of the Schedule Table.  The left column shows the WindowObjects:Width(Auto) automatic property value; the right column is the Formula Column, both formatted in feet and inches format.


David Koch
AutoCAD Architecture and Revit User
Blog | LinkedIn
EESignature

Message 3 of 4
r_swift
in reply to: David_W_Koch

Thanks Dave, formula  worked great, appreciate the help. Can you recommend a tutorial that deals with basic VBscript formulas/functions.

 

Rob

Message 4 of 4
David_W_Koch
in reply to: r_swift

I have a post in my blog with links to ACA schedule-related information, which gets updated semi-irregularly.  You may be able to find some of what you seek in those links.  Here are some of the relevant links from that page:

 

Scott Arvin posted a "Brain Dump" on the then newly added property data features (ADT 2004) that has some VBScript basics in it and may be of interest.  The forum to which he posted it is no longer available, but I reposted it to a related thread in the 2007 & Prior Forum.

 

The Microsoft Developer's Network Site has a nice section on VBScript, with explanations of the various commands.  The help links in the formula property editing dialog link to articles there.  [In the lower right Insert VBScript code pane, if you can right click on a category or a command and choose VBSCript Help: from the context menu.]  There are also books on VBScript available, if you prefer a non-electronic source of information.

 

I did a couple of AUGI Training Program classes on the Schedule Feature some years back, but I believe you need to be a paid-level member of AUGI to access the archives for that material (April 2005, ATP071 Schedule Basics; June 2006, ATP121 Formula Properties).

 

I also did an Autodesk University class in 2007, AB114-4, that covered creating an equipment schedule, that included material on using VBScript in formula properties.  Those materials are also at the AUGI site, but I believe the free membership level has access to them.


David Koch
AutoCAD Architecture and Revit User
Blog | LinkedIn
EESignature

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost