These functions are useful for handling the profiles.
Definitions:
Calculation profile: the current profile, which forms the basis each time a calculation is called. All assignment operations are also done in this profile.
Parent profile (of the calculation profile): the profile above the active profile in the profile hierarchy, whose values are inherited in the active profile, if they have not been set explicitly in the active profile.
Set parent profile: the profile used as the parent profile while creating an new profile (with newSubProfile). This setting can be changed by setParentProfile.
Name |
Purpose |
Argument |
Return value |
Sets the calculation profile |
Example |
clearCalcProfile |
Deletes all the values set explicitly in the active calculation profile i.e. the values inherited from the parent profile are valid again (shown in gray in the properties window) |
None |
None |
- |
clearCalcProfile; |
copyCalcProfile |
Creates a copy of the active profile at the same hierarchy level with the same values. The copied profile has the same parent profile as the original, as such the inherited values are the same. The values entered in the original profile are also set in the copied one. The design profile cannot be copied. |
1: BOOLEAN: recursive copy 2: INTEGER: ID of the parent profile to connect copied profiles. |
INTEGER: |
the newly created sub-profile |
i:= copyCalcProfile; |
copyParent Profile |
creates a copy of the profile defined in the set parent profile. (see getParentProfile) The copy is created on the same hierarchy level. Since the copied profile as a result has the same parent profile as the source profile, the inherited values are the same. The values entered in the original profile are also set in the copied one. Thereafter, the newly created profile is the active calculation profile and the set parent profile. The design profile cannot be copied. |
1: BOOLEAN: recursive copy 2: INTEGER: ID of the parent profile to connect copied profiles. |
INTEGER: |
the newly created parent profile |
i:= copyParentProfile; |
deleteCalcProfile |
Deletes the current calculation profile (including any sub-profiles, if available). |
None |
None |
the parent profile of the original calculation profile |
deleteCalcProfile; |
deleteCalcProfileDescendants |
Deletes the sub profiles of the current profile |
None |
None |
|
deleteCalcProfileDescendants; |
deleteParent Profile |
Deletes the set parent profile (including any sub-profiles, if available). |
None |
None |
the grand parent profile of the original calculation profile |
deleteParentProfile; |
deleteParentProfileDescendants |
Deletes the sub profiles of the profile that is used as current parent profile |
None |
None |
|
deleteParentProfileDescendants; |
getCalcProfile |
Returns the ID of the active calculation profile. |
None |
INTEGER: |
- |
i:=getCalcProfile; |
getFirstChildProfileId
|
Replaces the specified ID by that of its first child. |
INTEGER: After call: ID of the first child of the considered profile, -1 if the considered profile has no children |
None |
unchanged |
getFirstChildProfileId (i); |
getFirstProfileId
|
Returns the ID of the first profile in the model. |
None |
INTEGER: |
unchanged |
i:=getFirstProfileId; |
GetLastChildProfileId |
Replaces the specified ID by that of its last child |
INTEGER: After call: ID of the last child of the considered profile, -1 if the considered profile has no children |
None |
unchanged |
getLastChildProfileId ( i ); |
GetLastProfileId
|
Returns the ID of the last profile in the model (this is the last entry in the tree, not always the highest ID) |
None |
INTEGER: |
unchanged |
i:=getLastProfileId; |
getLocalDesignReferenceProfile
|
Returns the ID of the set reference profile in which the reference values are to be transferred in a local design. |
None |
INTEGER: ID of the reference profile |
unchanged |
i:=getLocalDesignReferenceProfile; |
getNextProfileId |
Replaces the specified ID by that of the next profile in the tree, regardless of its relative position. This function can be used to come through all the profiles. |
INTEGER: After call: ID of the next profile, 1 if the considered profile has no children |
None |
unchanged |
getNextProfileId( i ); |
getNextSibl ProfileId |
Replaces the specified ID by that of the next sibling profile. |
INTEGER: After call: ID of the next profile at the same hierarchy level -1 if the considered profile has no children |
None |
unchanged |
getNextSiblProfileId ( i ); |
getParentProfile |
Returns the ID of the set parent profile (the profile, which will be the parent profile when the next "newSubProfile“ is called) |
None |
INTEGER: |
unchanged |
i:=getParentProfile; |
getParent ProfileId |
Replaces the specified ID by that of its parent. |
INTEGER: After call: ID of the parent profile of the considered profile |
None |
unchanged |
getParentProfileId (i); |
getPrevProfileId |
Replaces the specified ID by that of the preceding profile in the tree, regardless of its relative position. This function can be used to move through all the profiles backwards. |
INTEGER: After call: ID of the preceding profile, -1 if the considered profile is the first one |
None |
unchanged |
getPrevProfileId( i ); |
getPrevSibl ProfileId |
Replaces the specified ID by that of the preceding sibling profile. |
INTEGER: After call: ID of the preceding profile at the same hierarchy level, -1 if the considered profile has no siblings |
None |
unchanged |
getPrevSiblProfileId (i); |
getRootProfileId |
Returns the ID of the main profile |
None |
INTEGER: |
unchanged |
iProfileId:= getRootProfileId; |
newSubProfile |
Creates a new sub-profile and returns its ID. The profile is created as the child of the set parent profile. |
1: STRING: Name of the sub-profile to be created (optional). If not specified, the name is sub_x |
INTEGER: |
the newly created sub-profile |
i:=newSubProfile (“Prof_1”) |
renameProfile |
Renames an existing profile. |
1: INTEGER: ID of the profile to be renamed, 2: STRING: new name |
BOOLEAN: true, when renaming is successful |
unchanged |
bOk:= renameProfile(iProfileId, "Auslegung" ); |
setCalcProfile |
Makes the profile specified by the ID as the active calculation profile. |
1: INTEGER: ID of the profile to be made as the calculation profile |
INTEGER: Id of the specified calculation profile. |
the specified profile |
setCalcProfile(i); |
setCalcProfileByName |
Like setCalcProfile, the profile is not specified by its ID, but instead by its name. |
1: STRING: Name of the profile to be made the calculation profile |
INTEGER: Id of the specified calculation profile. |
the specified profile |
i:=setCalcProfileByName ( "Sub_2" ); |
setParentProfile |
Makes the profile specified by the given ID as the set parent profile. The function also set the ID of the calculation profile to the ID of the parent profile. |
1: INTEGER: ID of the profile becoming the parent profile |
INTEGER: Id of the specified parent profile. |
the specified parent profile |
setParentProfile (i); |
SetParent ProfileByName |
Like setParentProfile, the profile is not specified by its ID, but instead by its name. The function also set the ID of the calculation profile to the ID of the parent profile. |
1: STRING: Name of the profile becoming the parent profile |
INTEGER: Id of the specified parent profile. |
the specified parent profile |
i:= setParentProfileByName ("Sub_1“); |
setLocalDesignReferenceProfile |
Sets the profile specified by the given ID as the reference profile, into which the reference values will be transferred if appropriate. |
1: INTEGER: ID of the profile becoming the reference profile |
None |
The reference profile does not need to exist at this time |
setDesignReferenceProfile (i); |