Can someone fill me in on the expressions please.
Having a nosey through the sqlite database, I can see how I would select what I want using SQL, for example SELECT * FROM BUILDINGS to select all buildings. As the server is stored in SQLITE, surely it would be a doddle to just give me direct access to the file's database within the program for selection purposes.
Oh what I wouldn't give for a bit of SQL injection, wait, that sounds wrong.
Solved! Go to Solution.
Solved by elliott.rosenfeld. Go to Solution.
Hi,
You can filter features through the Model Explorer, by right-clicking on the desired feature and choosing Filter Select. You can then build an expression that will filter the selected feature class by the conditions you set. In the expression, specify a property that captures the desired population that you want to select. For example, to select features within the desired feature class that have a positive elevation offset, you would create the expression Elevation Offset > 0.
In your example, for selecting all buildings, simply right click on the Buildings class in the Model Explorer and choose Select All.
Here's a help topic from the InfraWorks 2015 online help that explains more about how to select by filter (using an expression). I think this will accomplish what you are asking for.
http://help.autodesk.com/view/INFMDR/2015/ENU/?guid=GUID-647059D2-035D-4640-B90D-B6F840811CA4
Ah thanks for the model explorer trick, that was really helpful, thanks!!
I think I was expecting more of a nuts and bolts interface into the database.
As for the help file link, I'd checked that already, I found that next to useless.
EDIT: Ah, found the link I was after... always find these things after you need them!! Expressions Reference
For example I wanted to select buildings by base colour. so I followed your instructions and then just guessed until I got the expression to work.
BASE_COLOR = 'xFFFFFFFF' ??? ... ... ... ... ... BINGO!
this doesn't look like json, SQL, C# it encodes a single character, if it was based upon javascript then the double quotation marks should have worked... is this following a specific schema? Is it like PHP?
wow, nice answer e.rosie! help link and all...gave some kudos
internal protected virtual unsafe Human() : mostlyHarmless
I'm just here for the Shelties
Thanks jmaeding,
Happy to help!
Best,
Elliott
Hi Colour1,
I just wanted to follow up in regards to your comment:
"I think I was expecting more of a nuts and bolts interface into the database....this doesn't look like json, SQL, C# it encodes a single character, if it was based upon javascript then the double quotation marks should have worked... is this following a specific schema? Is it like PHP?"
~ The answer is that InfraWorks does not provide an SQL interface for the expression editor. The query language is an FDO expression language also used in other Autodesk products, such as Map 3D. If you haven't already, check out these reference pages for Functions, Operators, and Options in the help docs. Each specific type of Functions, Operator and Option has specific syntax examples provided (for example, see this help topic).
I'm sorry that I do not have a better FDO syntax reference to provide you, but here are some good starting tips:
Best,
Elliott
Can't find what you're looking for? Ask the community or share your knowledge.