<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://communities.bentley.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>How to create and use catalog keys?</title><link>https://communities.bentley.com/products/mobility-simulation/cube/w/wiki/64595/how-to-create-and-use-catalog-keys</link><description /><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>How to create and use catalog keys?</title><link>https://communities.bentley.com/products/mobility-simulation/cube/w/wiki/64595/how-to-create-and-use-catalog-keys</link><pubDate>Wed, 15 Feb 2023 17:22:18 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:ceeb0a26-d50b-4ab3-befe-5ca9e056325a</guid><dc:creator>Vu Dang</dc:creator><comments>https://communities.bentley.com/products/mobility-simulation/cube/w/wiki/64595/how-to-create-and-use-catalog-keys#comments</comments><description>Current Revision posted to CUBE Wiki by Vu Dang on 2/15/2023 5:22:18 PM&lt;br /&gt;
&lt;table style="background-color:#dce5f0;border:0px solid #dce5f0;" border="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style="text-align:right;"&gt;&lt;span style="color:#000000;"&gt;&lt;strong&gt;Product(s):&lt;/strong&gt;&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span style="color:#000000;"&gt;Cube&lt;/span&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align:right;"&gt;&lt;span style="color:#000000;"&gt;&lt;strong&gt;Version(s):&lt;/strong&gt;&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span style="color:#000000;"&gt;6.1 to 6.5&lt;/span&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align:right;"&gt;&lt;span style="color:#000000;"&gt;&lt;strong&gt;Area:&lt;/strong&gt;&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span style="color:#000000;"&gt;Other&lt;/span&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#000000;"&gt;Catalog keys define items that vary each time an application in a catalog is run. With catalog keys, users can develop one model to achieve many tasks with different parameter values, input files and run certain process only depends on the selection criteria.&lt;/span&gt;&lt;/p&gt;
&lt;h1&gt;&lt;span style="color:#000000;"&gt;Solution&lt;/span&gt;&lt;/h1&gt;
&lt;p&gt;&lt;span style="color:#000000;"&gt;In this sample catalog, we will demonstrate several examples on creating different types of catalog keys and the usage of those keys in script.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#000000;"&gt;A catalog key is defined by its type (integer, character, etc.) and control type (the input method). Keys used in the sample catalogs includes character keys, integer keys and Boolean key with control type using Edit, Combo List, Combo Edit, Radio Button, and Spin Control. The figure below gives a general overview of the keys included in the sample catalog:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;img alt=" " src="/resized-image/__size/690x278/__key/communityserver-wikis-components-files/00-00-00-06-46/pastedimage1585251775686v1.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#000000;"&gt;The application shows how to use those keys.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;img alt=" " src="/resized-image/__size/690x371/__key/communityserver-wikis-components-files/00-00-00-06-46/pastedimage1585251775687v2.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#000000;"&gt;In the first Pilot program, all the key values are printed out as a text file. The intention of this is for you to understand how we can refer to those keys and retrieve their values in other programs.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#000000;"&gt;Matrix program step #2 shows how to retrieve a key value and use it in the script.&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;strong&gt;&lt;span style="text-decoration:underline;"&gt;Note #1&lt;/span&gt;: Matrix 0 is a special case that the program will fail. Since the key used in that program (myVal_Edit) is defined as integer with extra specification in&amp;nbsp;&lt;em&gt;Properties &amp;gt; Advanced&amp;hellip;&lt;/em&gt;&amp;nbsp;forcing it as string! To run it, just double click the program and check the error message in the PRN file.&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#000000;"&gt;Matrix step #3 is an example to use Boolean key.&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;strong&gt;&lt;span style="text-decoration:underline;"&gt;Note #2&lt;/span&gt;: Boolean=1 is checked and Boolean=0 is unchecked. In the script, you should use values 1 and 0 for condition check.&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#000000;"&gt;Matrix step #4 is an example to include catalog key in the input file name. The way to do this is right-click an input file, and select&amp;nbsp;&lt;em&gt;L&lt;strong&gt;ink to &amp;gt; Link to Catalog Key&amp;hellip;&lt;/strong&gt;&lt;/em&gt;&amp;nbsp;then in the pop-out dialog, specify the file name with catalog key (i.e. Input\OD_{myYear}.MAT).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;img alt=" " src="/resized-image/__size/558x469/__key/communityserver-wikis-components-files/00-00-00-06-46/pastedimage1585251775687v3.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#000000;"&gt;Matrix step #5 give an example to use character key.&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;strong&gt;&lt;span style="text-decoration:underline;"&gt;Note #3&lt;/span&gt;: listAttribute is a character key with radio button. But in the&amp;nbsp;&lt;em&gt;Properties &amp;gt; Advanced&amp;hellip;&lt;/em&gt;&amp;nbsp;we specify its output value to be converted to the number of the item selected from the list.&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#000000;"&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#000000;"&gt;How to use and practice this catalog?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#000000;"&gt;1. Open the catalog in Cube.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#000000;"&gt;2. Double click the Base scenario, Cube will open the window for you to edit key values. You can put in values for any of the keys here. But certain keys have a range for the input value. If an invalid value is specified, you will have a pop-out window.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;img alt=" " src="/resized-image/__size/429x148/__key/communityserver-wikis-components-files/00-00-00-06-46/pastedimage1585251775687v4.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#000000;"&gt;3. Keys are listed in the key panel. To check the specification of a key, just right-click and select&amp;nbsp;&lt;em&gt;&lt;strong&gt;Properties&lt;/strong&gt;&lt;/em&gt;. You can also add a key here by selecting&amp;nbsp;&lt;em&gt;&lt;strong&gt;Add&lt;/strong&gt;&lt;/em&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;img alt=" " src="/resized-image/__size/615x500/__key/communityserver-wikis-components-files/00-00-00-06-46/pastedimage1585251775687v5.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#000000;"&gt;4. You are encouraged to create different kind of types and control with extra specifications in Range, list of allowed values and Advanced.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;img alt=" " src="/resized-image/__size/593x500/__key/communityserver-wikis-components-files/00-00-00-06-46/pastedimage1585251775687v6.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://communities.bentley.com/cfs-file/__key/communityserver-wikis-components-files/00-00-00-06-46/catKey.zip"&gt;communities.bentley.com/.../catKey.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>How to create and use catalog keys?</title><link>https://communities.bentley.com/products/mobility-simulation/cube/w/wiki/64595/how-to-create-and-use-catalog-keys/revision/1</link><pubDate>Tue, 14 Feb 2023 07:27:48 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:ceeb0a26-d50b-4ab3-befe-5ca9e056325a</guid><dc:creator>Angela Jose</dc:creator><comments>https://communities.bentley.com/products/mobility-simulation/cube/w/wiki/64595/how-to-create-and-use-catalog-keys#comments</comments><description>Revision 1 posted to CUBE Wiki by Angela Jose on 2/14/2023 7:27:48 AM&lt;br /&gt;
&lt;table style="background-color:#dce5f0;border:0px solid #dce5f0;" border="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style="text-align:right;"&gt;&lt;span style="color:#000000;"&gt;&lt;strong&gt;Product(s):&lt;/strong&gt;&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span style="color:#000000;"&gt;Cube&lt;/span&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align:right;"&gt;&lt;span style="color:#000000;"&gt;&lt;strong&gt;Version(s):&lt;/strong&gt;&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span style="color:#000000;"&gt;6.1 to 6.5&lt;/span&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align:right;"&gt;&lt;span style="color:#000000;"&gt;&lt;strong&gt;Area:&lt;/strong&gt;&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span style="color:#000000;"&gt;Other&lt;/span&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#000000;"&gt;Catalog keys define items that vary each time an application in a catalog is run. With catalog keys, users can develop one model to achieve many tasks with different parameter values, input files and run certain process only depends on the selection criteria.&lt;/span&gt;&lt;/p&gt;
&lt;h1&gt;&lt;span style="color:#000000;"&gt;Solution&lt;/span&gt;&lt;/h1&gt;
&lt;p&gt;&lt;span style="color:#000000;"&gt;In this sample catalog, we will demonstrate several examples on creating different types of catalog keys and the usage of those keys in script.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#000000;"&gt;A catalog key is defined by its type (integer, character, etc.) and control type (the input method). Keys used in the sample catalogs includes character keys, integer keys and Boolean key with control type using Edit, Combo List, Combo Edit, Radio Button, and Spin Control. The figure below gives a general overview of the keys included in the sample catalog:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;img alt=" " src="/resized-image/__size/690x278/__key/communityserver-wikis-components-files/00-00-00-06-46/pastedimage1585251775686v1.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#000000;"&gt;The application shows how to use those keys.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;img alt=" " src="/resized-image/__size/690x371/__key/communityserver-wikis-components-files/00-00-00-06-46/pastedimage1585251775687v2.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#000000;"&gt;In the first Pilot program, all the key values are printed out as a text file. The intention of this is for you to understand how we can refer to those keys and retrieve their values in other programs.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#000000;"&gt;Matrix program step #2 shows how to retrieve a key value and use it in the script.&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;strong&gt;&lt;span style="text-decoration:underline;"&gt;Note #1&lt;/span&gt;: Matrix 0 is a special case that the program will fail. Since the key used in that program (myVal_Edit) is defined as integer with extra specification in&amp;nbsp;&lt;em&gt;Properties&amp;gt;Advanced&amp;hellip;&lt;/em&gt;&amp;nbsp;forcing it as string! To run it, just double click the program and check the error message in the PRN file.&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#000000;"&gt;Matrix step #3 is an example to use Boolean key.&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;strong&gt;&lt;span style="text-decoration:underline;"&gt;Note #2&lt;/span&gt;: Boolean=1 is checked and Boolean=0 is unchecked. In the script, you should use values 1 and 0 for condition check.&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#000000;"&gt;Matrix step #4 is an example to include catalog key in the input file name! The way to do this is right click a input file, and select&amp;nbsp;&lt;strong&gt;link to&amp;gt;link to Catalog Key&amp;hellip;&lt;/strong&gt;&amp;nbsp;then in the pop out dialog, specify the file name with catalog key (i.e. Input\OD_{myYear}.MAT).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;img alt=" " src="/resized-image/__size/558x469/__key/communityserver-wikis-components-files/00-00-00-06-46/pastedimage1585251775687v3.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#000000;"&gt;Matrix step #5 give an example to use character key.&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;strong&gt;&lt;span style="text-decoration:underline;"&gt;Note #3&lt;/span&gt;: listAttribute is a character key with radio button. But in the&amp;nbsp;&lt;em&gt;Properties&amp;gt;Advanced&amp;hellip;&lt;/em&gt;&amp;nbsp;we specify its output value to be converted to the number of the item selected from the list.&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#000000;"&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#000000;"&gt;How to use and practice this catalog?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#000000;"&gt;1. Open the catalog in Cube.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#000000;"&gt;2. Double click the base scenario, Cube will open the window for you to edit key values. You can put in values for any of the keys here. But certain keys have a range for the input value. If an invalid value is specified, you will have an pop-out window.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;img alt=" " src="/resized-image/__size/429x148/__key/communityserver-wikis-components-files/00-00-00-06-46/pastedimage1585251775687v4.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#000000;"&gt;3. Keys are listed in the key panel. To check the specification of a key, just right click and select&amp;nbsp;&lt;strong&gt;properties&lt;/strong&gt;. You can also add a key here by selecting&amp;nbsp;&lt;strong&gt;Add&lt;/strong&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;img alt=" " src="/resized-image/__size/615x500/__key/communityserver-wikis-components-files/00-00-00-06-46/pastedimage1585251775687v5.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#000000;"&gt;4. You are encouraged to create different kind of types and control with extra specifications in Range, list of allowed values and Advanced.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;img alt=" " src="/resized-image/__size/593x500/__key/communityserver-wikis-components-files/00-00-00-06-46/pastedimage1585251775687v6.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://communities.bentley.com/cfs-file/__key/communityserver-wikis-components-files/00-00-00-06-46/catKey.zip"&gt;communities.bentley.com/.../catKey.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item></channel></rss>