AutoCAD Architecture Customization
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Property Set Definition "if a number equals text"
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi All,
I having problems trying to resolve a formula in the property definitions. I have a field that has USAGENO 060, 050 that the user inputs. But I would like to auto populate another field ROOMNAME with its corresponding text, to reduce input and avoid user error. The number always equals a room name as shown below.
060=Office
050=Lobby
I tried on the ROOMNAME field this but its not working, anyone know what is wrong. My field is set to formula.
=IF[USAGENO]=060,"Office",IF[USAGENO]=050,"Lobby")
Thank you.
alex
Solved! Go to Solution.
Re: Property Set Definition "if a number equals text"
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
This is how i would do it.
Select Case "[USAGENO]"
Case "060"
RESULT = "Office"
Case "050"
RESULT = "Lobby"
End Select
Notice the quotes around [USAGENO]. This will cast it to a string. Also the quotes in the Case statement. This also casts the values to a string. I prefer case statements as it allows for easy upgrades in the future if you need to add more room names.
Hope this helps.
Re: Property Set Definition "if a number equals text"
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
It worked! thanks a lot for your help!
Alex![]()
Re: Property Set Definition "if a number equals text"
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
I forgot to add this portion of it. I always put an else statement in my select case statement as shown. you could leave the quotes empty if you don't want to output a message but I always find it good coding practice to have in it there at least.
Select Case "[USAGENO]"
Case "060"
RESULT = "Office"
Case "050"
RESULT = "Lobby"
Case Else
RESULT = "** ERROR - Usage Number Not Found! **"
End Select

