It is possible to add custom asset classes and attributes to your models in Infrastructure Modeler. It’s possible to add attributes and classes to models after they have been initially created.
At this time, there is not an implemented GUI. Some XML editing is required.
How it works
The AIM schema is a simple list of tables that can be reflected by a straightforward XML template file. Every model uses a default schema that can be modified when the project is first created or after it has been created.
To use a custom schema when you are creating a new model, modify a copy of the im_schema.xst file that you'll find in the .files folder and point to that file in the New Model dialog. Look for an example in the following location on your computer (or see attached):
..\Documents\Infrastructure Models\<YourModel>.files
To modify the schema of an active model, look in your Infrastructure Models folder in your Documents directory, identify the <model_name>.files folder, and open the im_schema.xst file. Make your changes and reload the model.
The BuildingsSchemaDemo.xst file below shows you an example of adding some custom classes, adding some custom attributes for those classes, and assigning the classes and attributes some pretty names that will be used in the UI.
New classes are defined in the <Classes> element section. You'll see that new classes have to be based on existing base class types in the application:
<Classes> <Class name="APARTMENTS" base="BUILDINGS"> <Attribute name="BEDROOMS" type="Integer" default="2"/> <Attribute name="BATHROOMS" type="Double" default="1"/> <Attribute name="YR_BUILT" type="Integer"/> <Attribute name="OCCUPIED" type="Boolean"/> </Class> ... </Classes>
Pretty formatting for the Class names is done in the <Display> element section, for example:
<Item name="APARTMENTS" displayName="Apartment Buildings" category="Buildings"/>
and
<Item name="BEDROOMS" displayName="Bedrooms" category="Buildings" priority="401"/>
Built-in class names include:
Attribute type values can include:
What do the changes affect?
You will see your changes in the following places in the UI:
Things to keep in mind
BuildingsSchemaDemo.xst: (See below for attachments)
<?xml version="1.0" encoding="utf-8"?> <Schema xmlns="http://autodesk.com/im/schema" xmlns:xs="http://www.w3.org/2001/XMLSchema" xs:schemaLocation="im_schema.xsd"> <Classes> <Class name="APARTMENTS" base="BUILDINGS"> <Attribute name="BEDROOMS" type="Integer" default="2"/> <Attribute name="BATHROOMS" type="Double" default="1"/> <Attribute name="YR_BUILT" type="Integer"/> <Attribute name="OCCUPIED" type="Boolean"/> </Class> <Class name="SINGLE_FAMILY_HOMES" base="BUILDINGS"> <Attribute name="BEDROOMS" type="Integer" default="3"/> <Attribute name="BATHROOMS" type="Double" default="2"/> <Attribute name="YR_BUILT" type="Integer"/> <Attribute name="OCCUPIED" type="Boolean"/> </Class> <Class name="OFFICE_BUILDINGS" base="BUILDINGS"> <Attribute name="TOTAL_SF" type="Double"/> <Attribute name="OCCUPIED_SF" type="Double"/> <Attribute name="MAX_OCCUPANCY" type="Integer"/> <Attribute name="OWNER" type="String"/> </Class> </Classes> <Display> <Language code="en"> <Item name="BARRIERS" displayName="Barriers" category="Structures"/> <Item name="CITY_FURNITURE" displayName="City Furniture" category="Furniture"/> <Item name="BUILDINGS" displayName="Buildings" category="Structures"/> <Item name="COVERAGES" displayName="Coverage Areas" category="Land Base"/> <Item name="PIPELINES" displayName="Pipelines" category="Utilities"/> <Item name="PIPE_CONNECTORS" displayName="Pipeline Connectors" category="Utilities"/> <Item name="RAILWAYS" displayName="Railways" category="Transportation"/> <Item name="TERRAIN_SURFACES" displayName="Terrain" category="Land Base"/> <Item name="TERRAIN_TEXTURES" displayName="Ground Imagery" category="Land Base"/> <Item name="ROADS" displayName="Roads" category="Transportation"/> <Item name="TREES" displayName="Trees" category="Vegetation"/> <Item name="WATER_AREAS" displayName="Water Areas" category="Land Base"/> <Item name="MARKUP" displayName="Sketched Features" category="Markup"/> <Item name="SINGLE_FAMILY_HOMES" displayName="Single Family Homes" category="Buildings"/> <Item name="APARTMENTS" displayName="Apartment Buildings" category="Buildings"/> <Item name="OFFICE_BUILDINGS" displayName="Office Buildings" category="Buildings"/> <!-- Common --> <Item name="ID" displayName="ID" category="Common" priority="0"/> <Item name="DATA_SOURCE_ID" displayName="Data Source" category="Common" priority="1"/> <Item name="NAME" displayName="Name" category="Common" priority="3"/> <Item name="DESCRIPTION" displayName="Description" category="Common" priority="4"/> <Item name="EXTERNAL_ID" displayName="External ID" category="Common" priority="5"/> <Item name="TAG" displayName="Tag" category="Common" priority="6"/> <Item name="USER_DATA" displayName="User Data" category="Common" priority="7"/> <Item name="TOOLTIP" displayName="Tooltip" category="Common" priority="8"/> <Item name="LINK" displayName="Link" category="Common" priority="9"/> <!-- Stylization --> <Item name="MANUAL_STYLE" displayName="Manual Style" category="Stylization" priority="100"/> <Item name="RULE_STYLE" displayName="Rule Style" category="Stylization" priority="101"/> <!-- Geometry --> <Item name="GENERALIZATION" displayName="Generalization" category="Geometry" priority="200"/> <Item name="TESSELLATION" displayName="Tesselation" category="Geometry" priority="201"/> <Item name="MAX_SLOPE" displayName="Max Slope" category="Geometry" priority="202"/> <!-- Elevation --> <Item name="ELEVATION_OFFSET" displayName="Elevation Offset" category="Elevation" priority="300" isUnitOfLength="true"/> <Item name="ELEV_FROM" displayName="Elevation Offset From" category="Elevation" priority="301"/> <Item name="ELEV_TO" displayName="Elevation Offset To" category="Elevation" priority="302"/> <!-- Building --> <Item name="BUILDING_COMPLEX_ID" displayName="Building Complex ID" category="Building" priority="500"/> <Item name="ROOF_HEIGHT" displayName="Roof Height" category="Building" priority="501" isUnitOfLength="true"/> <Item name="ROOF_HEIGHT_ABSOLUTE" displayName="Roof Height Above Sea Level" category="Building" priority="502"/> <Item name="ROOF_SLOPE" displayName="Roof Slope" category="Building" priority="503"/> <Item name="ROOF_MATERIAL" displayName="Roof Material" category="Building" priority="504"/> <!-- Coverage --> <Item name="CATEGORY" displayName="Category" category="Coverage" priority="500"/> <Item name="RENDER_PRIORITY" displayName="Render Priority" category="Coverage" priority="501"/> <!-- Pipes --> <Item name="PIPE_TYPE" displayName="Type" category="Pipe" priority="500"/> <Item name="CONNECTOR_TYPE" displayName="Type" category="Pipe" priority="500"/> <Item name="SIZE_X" displayName="Size X" category="Pipe" priority="501" isUnitOfLength="true"/> <Item name="SIZE_Y" displayName="Size Y" category="Pipe" priority="502" isUnitOfLength="true"/> <Item name="SIZE_Z" displayName="Size Z" category="Pipe" priority="503"/> <Item name="ORIENTATION" displayName="Orientation" category="Pipe" priority="504"/> <!-- Transportation --> <Item name="TYPE" displayName="Type" category="Transportation" priority="500"/> <Item name="STACKED_ORDER_FROM" displayName="Stacked Order From" category="Transportation" priority="503"/> <Item name="STACKED_ORDER_TO" displayName="Stacked Order To" category="Transportation" priority="504"/> <Item name="IMPORTANCE" displayName="Importance" category="Transportation" priority="505"/> <!-- Road --> <Item name="LANES_FORWARD" displayName="Lanes Forward" category="Road" priority="600"/> <Item name="LANES_BACKWARD" displayName="Lanes Backward" category="Road" priority="601"/> <Item name="MAX_SPEED" displayName="Maximum Speed" category="Road" priority="602"/> <!-- Railway --> <Item name="LANES" displayName="Lanes" category="Railway" priority="600"/> <!-- Barrier --> <Item name="HEIGHT" displayName="Height" category="Barrier" priority="500" isUnitOfLength="true"/> <!-- TerrainTexture --> <Item name="RENDER_PRIORITY" displayName="Render Priority" category="TerrainTexture" priority="500"/> <!-- TerrainSurface --> <Item name="RENDER_PRIORITY" displayName="Render Priority" category="TerrainSurface" priority="500"/> <!-- 3D Model --> <Item name="MODEL_DATA_SOURCE_ID" displayName="Model Data Source" category="3D Model" priority="900"/> <Item name="MODEL_URI" displayName="Model Uri" category="3D Model" priority="901"/> <Item name="MODEL_VISIBLE" displayName="Model Visible" category="3D Model" priority="902"/> <Item name="MODEL_ROTATE_X" displayName="Rotate X" category="3D Model" priority="903"/> <Item name="MODEL_ROTATE_Y" displayName="Rotate Y" category="3D Model" priority="904"/> <Item name="MODEL_ROTATE_Z" displayName="Rotate Z" category="3D Model" priority="905"/> <Item name="MODEL_SCALE_X" displayName="Scale X" category="3D Model" priority="906"/> <Item name="MODEL_SCALE_Y" displayName="Scale Y" category="3D Model" priority="907"/> <Item name="MODEL_SCALE_Z" displayName="Scale Z" category="3D Model" priority="908"/> <Item name="MODEL_TRANSLATE_X" displayName="Translate X" category="3D Model" priority="909" isUnitOfLength="true"/> <Item name="MODEL_TRANSLATE_Y" displayName="Translate Y" category="3D Model" priority="910" isUnitOfLength="true"/> <Item name="MODEL_TRANSLATE_Z" displayName="Translate Z" category="3D Model" priority="911" isUnitOfLength="true"/> <!-- Lifespan --> <Item name="CREATION_DATE" displayName="Creation Date" category="Lifespan" priority="1000"/> <Item name="TERMINATION_DATE" displayName="Termination Date" category="Lifespan" priority="1001"/> <!-- Water areas --> <Item name="BANK_WIDTH" displayName="Bank Width" category="WaterArea" priority="1101" isUnitOfLength="true"/> <Item name="BUFFER_WIDTH" displayName="Buffer Width" category="WaterArea" priority="1102" isUnitOfLength="true"/> <Item name="WATER_LEVEL" displayName="Water Level" category="WaterArea" priority="1103"/> <!-- Custom buildings fields --> <Item name="BEDROOMS" displayName="Bedrooms" category="Buildings" priority="401"/> <Item name="BATHROOMS" displayName="Bathrooms" category="Buildings" priority="402"/> <Item name="YR_BUILT" displayName="Year built" category="Buildings" priority="403"/> <Item name="OCCUPIED" displayName="Occupied" category="Buildings" priority="404"/> <Item name="TOTAL_SF" displayName="Total Square Footage" category="Buildings" priority="405"/> <Item name="OCCUPIED_SF" displayName="Occupied Square Footage" category="Buildings" priority="406"/> <Item name="MAX_OCCUPANCY" displayName="Maximum occupancy" category="Buildings" priority="407"/> <Item name="OWNER" displayName="Owner name" category="Buildings" priority="408"/> </Language> </Display> </Schema>