cat_item_id(...)
cat_item_id(...) / catalogue_item_id(...)
This function searches a table in the catalogue for any criteria and returns the Data record ID of the first item found.
Syntax
cat_item_id('table';('column';'value');('column2';'value2');...)
or
catalogue_item_id('table';('column';'value');('column2';'value2');...)
The first parameter is the internal name of the table to be searched in the catalogue. You can obtain this by right-clicking on the desired table in the Catalogue Editor and selecting the entry Change alias name in the context menu. The internal name of the table is then displayed in the Entry field in the dialogue box that appears. You can then close this dialogue by clicking on the Cancel button.
You can also specify any number of search filters, but at least one. Search filters consist of a list, which consists of the name of the column as a string and the value to be searched for as a number or string. Examples of search filters are:
-
('DN';12)
searches in the columnDN
for the numerical value12
-
('TYPE';'R')
searches in the columnTYPE
for the string valueR
-
('P';1.5)
searches in the columnP
for the numerical value1,5
The brackets are necessary to identify the list and cannot be omitted.
As a return value, this function returns the record ID of the first entry that matches all search filters. If there is no matching entry, 0
will be returned.
Example:
Let's take a look at the table below:
Formula |
Result |
---|---|
|
40 |
|
43 |
Outdated: item_id(...), item_id_v(...), item_id_sv(...)
The following formulas have been replaced by the cat_item_id(...) function, but will continue to be evaluated if available.
item_id(...) |
Like cat_item_id, this function searches a table in the catalogue for any criteria. However, the result here is the row index of the first item found. Syntax: The syntax corresponds to that of the function cat_item_id.
|
||||||||||||||||||||||||||||||||||||
item_id_v(...) item_id_sv(...) |
These functions search for IDs from any HiCAD standard files (IPT files) based on given criteria. Syntax: Syntax: ![]()
item_id_v('standard file';'column name';value) v = value
item_id_sv('standard file','column name1';'value 1';'column name2'; value 2) sv = string,value
Examples: Influence thickness and material of a front plate: Front plate feature: Parameter-ID: item_id_sv ('BLECH';'MATERIAL';'S235JRG2';'S';20). Please note that 'BLECH' is German for 'PLATE'. Girder height of an I-beam: I-beam feature: Parameter-ID: item_id_v('DIN_1025-1';'H';200)
Explanations How do I get the standard designation? Assume that the thickness of a face plate is to be parameterised. The thickness itself is not offered in the feature, because it results from a line of a standard file. If you open the creation feature of the front plate, you will see the entry 'Catalogue: 127'. The number 127 is the internal representation of the standards file for plates. To deduce the name of the standards file from the number, open the file \Kataloge\sys\TBLIDs.DAT. Look for the line with the value 127 to get the exact name of the standard file: 'BLECH' (German for 'PLATE'). How do I get the column names? Now look for the file 'BLECH.ipt' in the directory '\Kataloge' and open it with a text editor. Here you will find the columns with their exact names and data types in plain text. |