Project: HiCAD Feature Technology
This function searches a table in the catalogue for any criteria and returns the index of the first entry found.
item_id('table';('column';'value');('column2';'value2');...)
The first parameter is the internal name of the table to be searched in the catalogue. You get this by right-clicking 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 enter as many search filters as you like, but at least one. Search filters consist of a list that 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 column DN
for the numerical value 12
('TYPE';'R')
searches in the column TYPE
for the string value R
('P';1.5)
searches in the column P
for the numerical value 1.5
The brackets are necessary to identify the list and cannot be omitted.
As a return value, this function returns the line number of the first entry that matches all search filters. If there is no matching entry, 0
is returned.
item_id('DIN_158_I';('DN';12))
searches the table in the screenshot above for entries with the value 12
in the column DN
and returns the row number of the first entry found.
item_id('DIN_158_I';('DN';12);('TYPE';'R');('P';1.5))
searches the table for entries with DN=12
, TYPE='R'
and P=1.5
.
These formulae have been replaced with the newer function item_id
, but can still be used.
This formula searches for IDs from any HiCAD standard files (IPT files) based on given criteria.
Syntax: item_id_v('standard file';'column name';value)
v = value
|
Type of variable |
Description |
---|---|---|
1st parameter |
String |
Name of the standard file |
2nd parameter |
String |
Name of the column (type INT or DBL) |
3rd parameter |
Real |
Value searched for (type INT or DBL) |
Return value |
Real |
Item ID which describes the part searched for |
item_id_sv('standard file';'column name 1';'value 1';'column name 2';value 2)
sv = string,value
Type of variable | Description | |
---|---|---|
1st parameter |
String |
Name of the standard file |
2nd parameter |
String |
Name of the 1st column (type STR) |
3rd parameter |
Real |
Value searched for (type STR) |
4th parameter |
String |
Name of the 2nd column (type INT or DBL) |
5th parameter |
Real |
Value searched for (type INT or DBL) |
Return value |
Real |
Item ID which describes the part searched for |
Examples:
Influence front plate thickness and material:
Front plate feature: Parameter ID: item_id_sv ('SHEET';'MATERIAL';'S235JRG2';'S';20)
Girder height of an I-beam:
I-beam feature: Parameter ID: item_id_v('DIN_1025-1';'H';200)
Explanation
How do I access the standard description?
Let us assume that the thickness of a front plate needs to be parameterised. The thickness itself is not made available in the feature, as it results from a row of a standard file. If you expand the generation feature of the front plate, you will see 'Catalogue: 127'. 127 is the internal representation of the standard file for sheets. To infer the name of the standard file from the number, you open file \Kataloge\sys\TBLIDs.DAT. Here, you look for the row with value 127 and thereby obtain the precise description of the standard file: 'SHEET'.
How do I access the column names?
You now find file 'BLECH.ipt' in the \Catalogues directory, using a text editor to open it. You will find the columns with their precise descriptions and data types in plain text here.
© Copyright 1994-2021, ISD Software und Systeme GmbH |
Data protection • Terms and Conditions • Cookies • Contact • Legal notes and Disclaimer