Parm Link Functions¶
The following functions are available for the simple Parm Link tool, which drives one Parm from another through an optional offset, scale and limits. See the Advanced Link group for links driven by a script.
|
Link two Parms so that changing the first drives the second. |
|
Link one Parm to another, so changing the first drives the second. |
Get the number of simple Parm Links in the model |
|
|
Get the ID of the Parm Link at the specified index |
|
Get the driving Parm of a Parm Link |
|
Get the driven Parm of a Parm Link |
|
Set the driving Parm of a Parm Link |
|
Set the driven Parm of a Parm Link |
|
Delete a single Parm Link |
Delete every simple Parm Link in the model. |
|
Sort the Parm links by the Parm each one reads from, ordering on container name, then group name, then Parm name. |
|
Sort the Parm links by the Parm each one drives, ordering on container name, then group name, then Parm name. |
|
|
Link every Parm of the container holding the first Parm to the matching Parm of the container holding the second. |
|
Link every Parm of the group holding the first Parm to the matching Parm of the group holding the second. |
|
Get whether a Parm Link applies its offset |
|
Set whether a Parm Link applies its offset. |
|
Get whether a Parm Link applies its scale |
|
Set whether a Parm Link applies its scale. |
|
Get whether a Parm Link applies its lower limit |
|
Set whether a Parm Link applies its lower limit. |
|
Get whether a Parm Link applies its upper limit |
|
Set whether a Parm Link applies its upper limit. |
Details¶
- openvsp.CopyAirfoil(geom_id, index)[source]¶
Link two Parms so that changing the first drives the second. This is the simple Parm Link the Link screen builds, not an Advanced Link. The link is created with its offset active and set to the difference between the two Parms, so B follows A while holding its current separation.
pod1 = AddGeom( "POD", "" ) pod2 = AddGeom( "POD", "" ) xa = GetParm( pod1, "X_Rel_Location", "XForm" ) xb = GetParm( pod2, "X_Rel_Location", "XForm" ) SetParmVal( xb, 3.0 ) Update() link_id = AddParmLink( xa, xb ) assert len( link_id ) > 0, "AddParmLink returned no id" assert GetNumParmLinks() == 1, "AddParmLink did not add the link" assert GetParmLinkID( 0 ) == link_id, "AddParmLink did not add the link" # The link drives B from A, holding the three unit offset it started with. SetParmValUpdate( xa, 5.0 ) Update() assert abs( GetParmVal( xb ) - 8.0 ) < 1e-6, "the parm link did not drive its output" # Linking the same pair twice has to be refused. The error queue is reached # through the error manager singleton in Python. err_mgr = ErrorMgrSingleton.getInstance() AddParmLink( xa, xb ) assert err_mgr.GetNumTotalErrors() > 0, "AddParmLink accepted a duplicate link" # That error was raised deliberately, so take it back off the queue. while err_mgr.GetNumTotalErrors() > 0 : err = err_mgr.PopLastError()
See also: GetNumParmLinks, GetParmLinkID, DelParmLink, DelAllParmLinks, AddAdvLink :param [in]: parm_a_id string Parm ID of the driving Parm :param [in]: parm_b_id string Parm ID of the driven Parm :rtype: void :return: string Parm Link ID
Copy the airfoil of a wing section to the airfoil clipboard. This is a separate clipboard from the one CopyXSec uses, so an airfoil can be moved without carrying the section geometry with it.
wid = AddGeom( "WING" ) # Give section 1 a distinctive airfoil. xsec_surf = GetXSecSurf( wid, 0 ) ChangeXSecShape( xsec_surf, 1, XS_SIX_SERIES ) Update() CopyAirfoil( wid, 1 ) PasteAirfoil( wid, 0 ) # The airfoil travels; the section geometry does not. assert GetXSecShape( GetXSec( xsec_surf, 0 ) ) == XS_SIX_SERIES, "the airfoil did not paste" # A Geom that is not a wing has to be rejected. err_mgr = ErrorMgrSingleton.getInstance() pid = AddGeom( "POD" ) CopyAirfoil( pid, 0 ) assert err_mgr.GetNumTotalErrors() > 0, "CopyAirfoil accepted a Geom that is not a wing" while err_mgr.GetNumTotalErrors() > 0 : err = err_mgr.PopLastError()
See also: PasteAirfoil, CopyXSec :param [in]: geom_id string Wing Geom ID :param [in]: index int Wing section index
- openvsp.AddParmLink(parm_a_id, parm_b_id)[source]¶
Link one Parm to another, so changing the first drives the second.
pid = AddGeom( "POD" ) Update() len_parm = GetParm( pid, "Length", "Design" ) dia_parm = GetParm( pid, "FineRatio", "Design" ) link_id = AddParmLink( len_parm, dia_parm ) assert len( link_id ) > 0, "AddParmLink returned no ID" assert GetNumParmLinks() == 1, "AddParmLink did not add the link"
See also: GetNumParmLinks, DeleteParmLink :param [in]: parm_a_id string Parm ID that drives :param [in]: parm_b_id string Parm ID that follows :rtype: string :return: string Parm link ID
- openvsp.GetNumParmLinks()[source]¶
Get the number of simple Parm Links in the model
pod1 = AddGeom( "POD", "" ) pod2 = AddGeom( "POD", "" ) assert GetNumParmLinks() == 0, "a new model starts with Parm Links" AddParmLink( GetParm( pod1, "X_Rel_Location", "XForm" ), GetParm( pod2, "X_Rel_Location", "XForm" ) ) AddParmLink( GetParm( pod1, "Y_Rel_Location", "XForm" ), GetParm( pod2, "Y_Rel_Location", "XForm" ) ) assert GetNumParmLinks() == 2, "GetNumParmLinks did not count both links" # Every link the count claims has to be findable. for i in range( GetNumParmLinks() ): assert len( GetParmLinkID( i ) ) > 0, "a counted link cannot be found"
See also: AddParmLink, GetParmLinkID :rtype: int :return: int Number of Parm Links
- openvsp.GetParmLinkID(index)[source]¶
Get the ID of the Parm Link at the specified index
pod1 = AddGeom( "POD", "" ) pod2 = AddGeom( "POD", "" ) first = AddParmLink( GetParm( pod1, "X_Rel_Location", "XForm" ), GetParm( pod2, "X_Rel_Location", "XForm" ) ) second = AddParmLink( GetParm( pod1, "Y_Rel_Location", "XForm" ), GetParm( pod2, "Y_Rel_Location", "XForm" ) ) # Links come back in the order they were added. assert GetParmLinkID( 0 ) == first, "GetParmLinkID did not report the links in order" assert GetParmLinkID( 1 ) == second, "GetParmLinkID did not report the links in order" # An index past the end has to be rejected. The error queue is reached # through the error manager singleton in Python. err_mgr = ErrorMgrSingleton.getInstance() GetParmLinkID( GetNumParmLinks() ) assert err_mgr.GetNumTotalErrors() > 0, "GetParmLinkID accepted an index past the end" # That error was raised deliberately, so take it back off the queue. while err_mgr.GetNumTotalErrors() > 0 : err = err_mgr.PopLastError()
See also: AddParmLink, GetNumParmLinks :param [in]: index int Parm Link index :rtype: string :return: string Parm Link ID
- openvsp.GetParmLinkAParm(link_id)[source]¶
Get the driving Parm of a Parm Link
pod1 = AddGeom( "POD", "" ) pod2 = AddGeom( "POD", "" ) xa = GetParm( pod1, "X_Rel_Location", "XForm" ) xb = GetParm( pod2, "X_Rel_Location", "XForm" ) link_id = AddParmLink( xa, xb ) assert GetParmLinkAParm( link_id ) == xa, "the link does not report the Parms it was given" assert GetParmLinkBParm( link_id ) == xb, "the link does not report the Parms it was given" # Pointing A at a different Parm has to take. ya = GetParm( pod1, "Y_Rel_Location", "XForm" ) SetParmLinkAParm( link_id, ya ) assert GetParmLinkAParm( link_id ) == ya, "SetParmLinkAParm did not take" # A Parm that does not exist has to be rejected. The error queue is reached # through the error manager singleton in Python. err_mgr = ErrorMgrSingleton.getInstance() SetParmLinkAParm( link_id, "NOSUCHPARM" ) assert err_mgr.GetNumTotalErrors() > 0, "SetParmLinkAParm accepted a bad Parm ID" # That error was raised deliberately, so take it back off the queue. while err_mgr.GetNumTotalErrors() > 0 : err = err_mgr.PopLastError()
See also: AddParmLink, GetParmLinkBParm, SetParmLinkAParm :param [in]: link_id string Parm Link ID :rtype: string :return: string Parm ID of the driving Parm
- openvsp.GetParmLinkBParm(link_id)[source]¶
Get the driven Parm of a Parm Link
pod1 = AddGeom( "POD", "" ) pod2 = AddGeom( "POD", "" ) xa = GetParm( pod1, "X_Rel_Location", "XForm" ) xb = GetParm( pod2, "X_Rel_Location", "XForm" ) link_id = AddParmLink( xa, xb ) assert GetParmLinkBParm( link_id ) == xb, "GetParmLinkBParm did not report the driven Parm" # The two ends are different Parms. assert GetParmLinkBParm( link_id ) != GetParmLinkAParm( link_id ), "both ends of the link report the same Parm"
See also: AddParmLink, GetParmLinkAParm, SetParmLinkBParm :param [in]: link_id string Parm Link ID :rtype: string :return: string Parm ID of the driven Parm
- openvsp.SetParmLinkAParm(link_id, parm_id)[source]¶
Set the driving Parm of a Parm Link
pod1 = AddGeom( "POD", "" ) pod2 = AddGeom( "POD", "" ) xa = GetParm( pod1, "X_Rel_Location", "XForm" ) xb = GetParm( pod2, "X_Rel_Location", "XForm" ) link_id = AddParmLink( xa, xb ) ya = GetParm( pod1, "Y_Rel_Location", "XForm" ) SetParmLinkAParm( link_id, ya ) assert GetParmLinkAParm( link_id ) == ya, "SetParmLinkAParm did not take" # The driven end is left alone. assert GetParmLinkBParm( link_id ) == xb, "SetParmLinkAParm disturbed the driven Parm"
See also: AddParmLink, GetParmLinkAParm :param [in]: link_id string Parm Link ID :param [in]: parm_id string Parm ID of the driving Parm
- openvsp.SetParmLinkBParm(link_id, parm_id)[source]¶
Set the driven Parm of a Parm Link
pod1 = AddGeom( "POD", "" ) pod2 = AddGeom( "POD", "" ) xa = GetParm( pod1, "X_Rel_Location", "XForm" ) xb = GetParm( pod2, "X_Rel_Location", "XForm" ) link_id = AddParmLink( xa, xb ) yb = GetParm( pod2, "Y_Rel_Location", "XForm" ) SetParmLinkBParm( link_id, yb ) assert GetParmLinkBParm( link_id ) == yb, "SetParmLinkBParm did not take" # The driving end is left alone. assert GetParmLinkAParm( link_id ) == xa, "SetParmLinkBParm disturbed the driving Parm"
See also: AddParmLink, GetParmLinkBParm :param [in]: link_id string Parm Link ID :param [in]: parm_id string Parm ID of the driven Parm
- openvsp.DelParmLink(link_id)[source]¶
Delete a single Parm Link
pod1 = AddGeom( "POD", "" ) pod2 = AddGeom( "POD", "" ) first = AddParmLink( GetParm( pod1, "X_Rel_Location", "XForm" ), GetParm( pod2, "X_Rel_Location", "XForm" ) ) second = AddParmLink( GetParm( pod1, "Y_Rel_Location", "XForm" ), GetParm( pod2, "Y_Rel_Location", "XForm" ) ) DelParmLink( first ) # Only the named link goes. assert GetNumParmLinks() == 1, "DelParmLink removed the wrong link" assert GetParmLinkID( 0 ) == second, "DelParmLink removed the wrong link" # An ID that is not a link has to be rejected. The error queue is reached # through the error manager singleton in Python. err_mgr = ErrorMgrSingleton.getInstance() DelParmLink( "NOSUCHLINK" ) assert err_mgr.GetNumTotalErrors() > 0, "DelParmLink accepted a bad ID" # That error was raised deliberately, so take it back off the queue. while err_mgr.GetNumTotalErrors() > 0 : err = err_mgr.PopLastError()
See also: AddParmLink, DelAllParmLinks :param [in]: link_id string Parm Link ID
- openvsp.DelAllParmLinks()[source]¶
Delete every simple Parm Link in the model. Advanced Links are a separate list and are left alone.
pod1 = AddGeom( "POD", "" ) pod2 = AddGeom( "POD", "" ) AddParmLink( GetParm( pod1, "X_Rel_Location", "XForm" ), GetParm( pod2, "X_Rel_Location", "XForm" ) ) AddParmLink( GetParm( pod1, "Y_Rel_Location", "XForm" ), GetParm( pod2, "Y_Rel_Location", "XForm" ) ) AddAdvLink( "ExampleAdvLink" ) DelAllParmLinks() assert GetNumParmLinks() == 0, "DelAllParmLinks left links behind" assert len( GetAdvLinkNames() ) == 1, "DelAllParmLinks removed an advanced link"
See also: AddParmLink, DelParmLink
- openvsp.SortParmLinksByA()[source]¶
Sort the Parm links by the Parm each one reads from, ordering on container name, then group name, then Parm name. This is the Sort A button on the Parm Link screen.
pod = AddGeom( "POD", "" ) length = FindParm( pod, "Length", "Design" ) fine = FindParm( pod, "FineRatio", "Design" ) x_pos = FindParm( pod, "X_Rel_Location", "XForm" ) y_pos = FindParm( pod, "Y_Rel_Location", "XForm" ) # Add the links out of order, reading from Length first. link1 = AddParmLink( length, x_pos ) link2 = AddParmLink( fine, y_pos ) SortParmLinksByA() # FineRatio sorts ahead of Length, so its link comes first. assert GetParmLinkID( 0 ) == link2, "SortParmLinksByA did not sort the links"
See also: SortParmLinksByB, AddParmLink
- openvsp.SortParmLinksByB()[source]¶
Sort the Parm links by the Parm each one drives, ordering on container name, then group name, then Parm name. This is the Sort B button on the Parm Link screen.
pod = AddGeom( "POD", "" ) length = FindParm( pod, "Length", "Design" ) fine = FindParm( pod, "FineRatio", "Design" ) x_pos = FindParm( pod, "X_Rel_Location", "XForm" ) y_pos = FindParm( pod, "Y_Rel_Location", "XForm" ) # Add the links so that the one driving Y_Rel_Location comes first. link1 = AddParmLink( length, y_pos ) link2 = AddParmLink( fine, x_pos ) SortParmLinksByB() # X_Rel_Location sorts ahead of Y_Rel_Location, so its link comes first. assert GetParmLinkID( 0 ) == link2, "SortParmLinksByB did not sort the links"
See also: SortParmLinksByA, AddParmLink
- openvsp.LinkAllComp(parm_a_id, parm_b_id)[source]¶
Link every Parm of the container holding the first Parm to the matching Parm of the container holding the second. This is the Link screen’s “Link All Comp” button.
pod1 = AddGeom( "POD", "" ) pod2 = AddGeom( "POD", "" ) LinkAllComp( GetParm( pod1, "X_Rel_Location", "XForm" ), GetParm( pod2, "X_Rel_Location", "XForm" ) ) # A Pod carries many Parms, so this makes many links at once. assert GetNumParmLinks() >= 2, "LinkAllComp did not link the containers" # Every link it made joins two real Parms. for i in range( GetNumParmLinks() ): lid = GetParmLinkID( i ) assert len( GetParmLinkAParm( lid ) ) > 0, "LinkAllComp made a link with no Parms" assert len( GetParmLinkBParm( lid ) ) > 0, "LinkAllComp made a link with no Parms"
See also: AddParmLink, LinkAllGroup :param [in]: parm_a_id string Parm ID naming the driving container :param [in]: parm_b_id string Parm ID naming the driven container :rtype: boolean :return: bool True if any link was made
- openvsp.LinkAllGroup(parm_a_id, parm_b_id)[source]¶
Link every Parm of the group holding the first Parm to the matching Parm of the group holding the second. This is the Link screen’s “Link All Group” button.
pod1 = AddGeom( "POD", "" ) pod2 = AddGeom( "POD", "" ) LinkAllGroup( GetParm( pod1, "X_Rel_Location", "XForm" ), GetParm( pod2, "X_Rel_Location", "XForm" ) ) # The XForm group carries several Parms, so this makes several links. num_group = GetNumParmLinks() assert num_group >= 2, "LinkAllGroup did not link the groups" # A group is part of the container, so linking the whole container makes at # least as many links. DelAllParmLinks() LinkAllComp( GetParm( pod1, "X_Rel_Location", "XForm" ), GetParm( pod2, "X_Rel_Location", "XForm" ) ) assert GetNumParmLinks() >= num_group, "LinkAllGroup linked more than LinkAllComp"
See also: AddParmLink, LinkAllComp :param [in]: parm_a_id string Parm ID naming the driving group :param [in]: parm_b_id string Parm ID naming the driven group :rtype: boolean :return: bool True if any link was made
- openvsp.GetParmLinkOffsetFlag(link_id)[source]¶
Get whether a Parm Link applies its offset
pod1 = AddGeom( "POD", "" ) pod2 = AddGeom( "POD", "" ) xa = GetParm( pod1, "X_Rel_Location", "XForm" ) xb = GetParm( pod2, "X_Rel_Location", "XForm" ) link_id = AddParmLink( xa, xb ) # A new link comes up with its offset on and the rest off. assert GetParmLinkOffsetFlag( link_id ) == True, "the offset flag did not start where a new link starts" SetParmLinkOffsetFlag( link_id, not GetParmLinkOffsetFlag( link_id ) ) assert GetParmLinkOffsetFlag( link_id ) != True, "GetParmLinkOffsetFlag did not follow the setter"
See also: SetParmLinkOffsetFlag, AddParmLink :param [in]: link_id string Parm Link ID :rtype: boolean :return: bool True if the offset is applied
- openvsp.SetParmLinkOffsetFlag(link_id, flag)[source]¶
Set whether a Parm Link applies its offset. The value itself is the link’s Offset Parm, reached with FindParm on the link ID.
pod1 = AddGeom( "POD", "" ) pod2 = AddGeom( "POD", "" ) link_id = AddParmLink( GetParm( pod1, "X_Rel_Location", "XForm" ), GetParm( pod2, "X_Rel_Location", "XForm" ) ) SetParmLinkOffsetFlag( link_id, True ) assert GetParmLinkOffsetFlag( link_id ), "the offset flag did not take" SetParmLinkOffsetFlag( link_id, False ) assert not GetParmLinkOffsetFlag( link_id ), "the offset flag did not clear" # The value it applies is a Parm on the link itself. assert len( FindParm( link_id, "Offset", "Link" ) ) > 0, "the link carries no Offset Parm"
See also: GetParmLinkOffsetFlag, AddParmLink :param [in]: link_id string Parm Link ID :param [in]: flag bool True to apply the offset
- openvsp.GetParmLinkScaleFlag(link_id)[source]¶
Get whether a Parm Link applies its scale
pod1 = AddGeom( "POD", "" ) pod2 = AddGeom( "POD", "" ) xa = GetParm( pod1, "X_Rel_Location", "XForm" ) xb = GetParm( pod2, "X_Rel_Location", "XForm" ) link_id = AddParmLink( xa, xb ) # A new link comes up with its offset on and the rest off. assert GetParmLinkScaleFlag( link_id ) == False, "the scale flag did not start where a new link starts" SetParmLinkScaleFlag( link_id, not GetParmLinkScaleFlag( link_id ) ) assert GetParmLinkScaleFlag( link_id ) != False, "GetParmLinkScaleFlag did not follow the setter"
See also: SetParmLinkScaleFlag, AddParmLink :param [in]: link_id string Parm Link ID :rtype: boolean :return: bool True if the scale is applied
- openvsp.SetParmLinkScaleFlag(link_id, flag)[source]¶
Set whether a Parm Link applies its scale. The value itself is the link’s Scale Parm, reached with FindParm on the link ID.
pod1 = AddGeom( "POD", "" ) pod2 = AddGeom( "POD", "" ) link_id = AddParmLink( GetParm( pod1, "X_Rel_Location", "XForm" ), GetParm( pod2, "X_Rel_Location", "XForm" ) ) SetParmLinkScaleFlag( link_id, True ) assert GetParmLinkScaleFlag( link_id ), "the scale flag did not take" SetParmLinkScaleFlag( link_id, False ) assert not GetParmLinkScaleFlag( link_id ), "the scale flag did not clear" # The value it applies is a Parm on the link itself. assert len( FindParm( link_id, "Scale", "Link" ) ) > 0, "the link carries no Scale Parm"
See also: GetParmLinkScaleFlag, AddParmLink :param [in]: link_id string Parm Link ID :param [in]: flag bool True to apply the scale
- openvsp.GetParmLinkLowerLimitFlag(link_id)[source]¶
Get whether a Parm Link applies its lower limit
pod1 = AddGeom( "POD", "" ) pod2 = AddGeom( "POD", "" ) xa = GetParm( pod1, "X_Rel_Location", "XForm" ) xb = GetParm( pod2, "X_Rel_Location", "XForm" ) link_id = AddParmLink( xa, xb ) # A new link comes up with its offset on and the rest off. assert GetParmLinkLowerLimitFlag( link_id ) == False, "the lower limit flag did not start where a new link starts" SetParmLinkLowerLimitFlag( link_id, not GetParmLinkLowerLimitFlag( link_id ) ) assert GetParmLinkLowerLimitFlag( link_id ) != False, "GetParmLinkLowerLimitFlag did not follow the setter"
See also: SetParmLinkLowerLimitFlag, AddParmLink :param [in]: link_id string Parm Link ID :rtype: boolean :return: bool True if the lower limit is applied
- openvsp.SetParmLinkLowerLimitFlag(link_id, flag)[source]¶
Set whether a Parm Link applies its lower limit. The value itself is the link’s LowerLimit Parm, reached with FindParm on the link ID.
pod1 = AddGeom( "POD", "" ) pod2 = AddGeom( "POD", "" ) link_id = AddParmLink( GetParm( pod1, "X_Rel_Location", "XForm" ), GetParm( pod2, "X_Rel_Location", "XForm" ) ) SetParmLinkLowerLimitFlag( link_id, True ) assert GetParmLinkLowerLimitFlag( link_id ), "the lower limit flag did not take" SetParmLinkLowerLimitFlag( link_id, False ) assert not GetParmLinkLowerLimitFlag( link_id ), "the lower limit flag did not clear" # The value it applies is a Parm on the link itself. assert len( FindParm( link_id, "LowerLimit", "Link" ) ) > 0, "the link carries no LowerLimit Parm"
See also: GetParmLinkLowerLimitFlag, AddParmLink :param [in]: link_id string Parm Link ID :param [in]: flag bool True to apply the lower limit
- openvsp.GetParmLinkUpperLimitFlag(link_id)[source]¶
Get whether a Parm Link applies its upper limit
pod1 = AddGeom( "POD", "" ) pod2 = AddGeom( "POD", "" ) xa = GetParm( pod1, "X_Rel_Location", "XForm" ) xb = GetParm( pod2, "X_Rel_Location", "XForm" ) link_id = AddParmLink( xa, xb ) # A new link comes up with its offset on and the rest off. assert GetParmLinkUpperLimitFlag( link_id ) == False, "the upper limit flag did not start where a new link starts" SetParmLinkUpperLimitFlag( link_id, not GetParmLinkUpperLimitFlag( link_id ) ) assert GetParmLinkUpperLimitFlag( link_id ) != False, "GetParmLinkUpperLimitFlag did not follow the setter"
See also: SetParmLinkUpperLimitFlag, AddParmLink :param [in]: link_id string Parm Link ID :rtype: boolean :return: bool True if the upper limit is applied
- openvsp.SetParmLinkUpperLimitFlag(link_id, flag)[source]¶
Set whether a Parm Link applies its upper limit. The value itself is the link’s UpperLimit Parm, reached with FindParm on the link ID.
pod1 = AddGeom( "POD", "" ) pod2 = AddGeom( "POD", "" ) link_id = AddParmLink( GetParm( pod1, "X_Rel_Location", "XForm" ), GetParm( pod2, "X_Rel_Location", "XForm" ) ) SetParmLinkUpperLimitFlag( link_id, True ) assert GetParmLinkUpperLimitFlag( link_id ), "the upper limit flag did not take" SetParmLinkUpperLimitFlag( link_id, False ) assert not GetParmLinkUpperLimitFlag( link_id ), "the upper limit flag did not clear" # The value it applies is a Parm on the link itself. assert len( FindParm( link_id, "UpperLimit", "Link" ) ) > 0, "the link carries no UpperLimit Parm"
See also: GetParmLinkUpperLimitFlag, AddParmLink :param [in]: link_id string Parm Link ID :param [in]: flag bool True to apply the upper limit