AutoCAD Architecture General Discussion

Reply
Member
ktttallen
Posts: 4
Registered: ‎08-15-2012
Message 1 of 9 (273 Views)
Accepted Solution

door swing in schedule data

273 Views, 8 Replies
10-08-2012 09:45 AM

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

*Expert Elite*
leothebuilder
Posts: 481
Registered: ‎07-05-2010
Message 2 of 9 (261 Views)

Re: door swing in schedule data

10-08-2012 02:31 PM 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.

*Expert Elite*
David_W._Koch
Posts: 2,429
Registered: ‎12-09-2003
Message 3 of 9 (252 Views)

Re: door swing in schedule data

10-09-2012 06:20 AM 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
Member
ktttallen
Posts: 4
Registered: ‎08-15-2012
Message 4 of 9 (226 Views)

Re: door swing in schedule data

10-11-2012 06:40 AM 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

*Expert Elite*
David_W._Koch
Posts: 2,429
Registered: ‎12-09-2003
Message 5 of 9 (212 Views)

Re: door swing in schedule data

10-11-2012 07:27 PM 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
Member
ktttallen
Posts: 4
Registered: ‎08-15-2012
Message 6 of 9 (201 Views)

Re: door swing in schedule data

10-12-2012 11:08 AM 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

Mentor
David_Knight
Posts: 397
Registered: ‎04-08-2004
Message 7 of 9 (183 Views)

Re: door swing in schedule data

10-15-2012 07:09 AM 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!

*Expert Elite*
David_W._Koch
Posts: 2,429
Registered: ‎12-09-2003
Message 8 of 9 (171 Views)

Re: door swing in schedule data

10-16-2012 06:17 AM 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
Mentor
David_Knight
Posts: 397
Registered: ‎04-08-2004
Message 9 of 9 (166 Views)

Re: door swing in schedule data

10-16-2012 06:44 AM in reply to: David_W._Koch

Thanks David.

 

I'll check those out at lunch time.

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community