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: 

door swing in schedule data

8 REPLIES 8
SOLVED
Reply
Message 1 of 9
ktttallen
735 Views, 8 Replies

door swing in schedule data

I would like to add a automatic property set definition for door "swingdirection" in my door schedule and replace the “left” with LH, “right” with RH and if neither (N/A)  with DBL (for double leaf doors). 

I thought I remembered being able to view source code in 2004 ADA to give me an idea on how to change and replace but I’m lost in 2013.

Thanks

Todd

8 REPLIES 8
Message 2 of 9
leothebuilder
in reply to: ktttallen

The doorswing property is already defined in OOTB content.

You will need a formula property to convert the doorswing property result from LEFT and Right to L/H and R/H respectively. I don't know enough about If and Then statements, maybe someone else will join in this post to point you in the right direction.

Message 3 of 9
David_W_Koch
in reply to: ktttallen

I would suggest using a Select Case statement, given the multiple choices (although nested If statements could also work).  Assuming that an automatic property using the Swing Direction automatic property source for Doors has been created, and called SwingDirection, the following will do what you asked:

 

Select Case "[SwingDirection]"
	Case "Left"
		RESULT = "LH"
	Case "Right"
		RESULT = "RH"
	Case "NA"
		RESULT = "DBL"
	Case Else
		RESULT = "**UNEXPECTED RESULT**"
End Select

 [SwingDirection] has be be a properly created property reference, selected from the lower left pane of the formula editing dialog, and not simply typed (or cut and pasted).  You will want to enclose it in double quotes.

 

A few thoughts:

1.  ACA has no automatic way (of which I know), to determine whether a door swings into or out of the "inside" space being served, so there is no automatic way to get it to report left hand reverse (LHR) or right hand reverse (RHR).  The formula above will report LH for RHR and RH for LHR.  You could add a manual property to flag reverse doors, and test for that as well.

2.  The SwingDirection property will report NA for more than just double doors.  The Pass Through (used for Cased Openings),  Overhead and Revolving Door Types (and, perhaps others, I did not test all types) also report NA, but would not be considered double doors.  The formula above could be made more complex, to test for the Door Type, and report something different for non-double doors without a SwingDirection.


David Koch
AutoCAD Architecture and Revit User
Blog | LinkedIn
EESignature

Message 4 of 9
ktttallen
in reply to: David_W_Koch

Hi David and thanks, Its been a long time since I've made any custom properties, would there be any chance you could attach or send me a dwg with this working so i can look into exactly how its done.

I tried it a few times and can not get it to work.

if not its no big deal.

Thanks again

Todd

tallen@chinburgbuilders.com

Message 5 of 9
David_W_Koch
in reply to: ktttallen

The attached ZIP file has a drawing file, done in ACA 2010, that has a working version of the formula property previously posted.  Look in the DoorObjects2 Property Set Definition, for the DoorSwing property.


David Koch
AutoCAD Architecture and Revit User
Blog | LinkedIn
EESignature

Message 6 of 9
ktttallen
in reply to: David_W_Koch

Now I know why it did not work for me. I was naming the new formula incorrectly.

Thank you, works perffect.

Todd

Message 7 of 9
David_Knight
in reply to: David_W_Koch

Curious, what is the difference between a "case" clause and a "else if" clause?

 

i usually use else if... else  type of clauses in coding.

 

is this bad?

 

im pretty newb, but know enough to get dirty and get stuff done.  thanks for the input as always!

Message 8 of 9
David_W_Koch
in reply to: David_Knight

Nothing wrong with either approach.  Which is better for a given situation depends on the situation and on the programmer's preferences.  If there are only two or three test values, if you need to do a comparison other than "equals", or if you want to test a different variable if the first test fails (ElseIf), then and If Then Else statement can be appropriate.  Select Case statements shine when you are testing the value of just one variable, especially if there are many possible values, and the comparison is "equals".  You can do the same with nested If Then Else statements, but the code can become much harder to read.

 

It is actually possible to use comparisons other than equals in a Select Case statement, provided that you make the thing to which you are comparing "true"  (vbTrue).  You can find an example of that near the end of this blog post, which covers the Select Case statement in more detail.

http://architects-desktop.blogspot.com/2005/07/structureflow-in-formula-properties_09.html

 

For more detail on the If Then Else statment, you may want to look at this blog post:

http://architects-desktop.blogspot.com/2005/07/structureflow-in-formula-properties.html

 

Microsoft also has a website (http://msdn.microsoft.com) that provides explanations of various VBScript commands.  You can access that while editing a formula property by finding the command for which you want more information in the lower right pane, right clicking on the command, and choosing VbScript Help: from the context menu.


David Koch
AutoCAD Architecture and Revit User
Blog | LinkedIn
EESignature

Message 9 of 9
David_Knight
in reply to: David_W_Koch

Thanks David.

 

I'll check those out at lunch time.

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

Post to forums  

Autodesk Design & Make Report

”Boost