Description
Adds a constraint to the AWB Constraint Collection.
Syntax
Parameters
See Also
Example
Add multiple analysis workbench access constraints of the same type to an STK Object
[C#] |
---|
IAgAccessConstraintCollection accessConstraints = stkobject.AccessConstraints;
IAgAccessCnstrAWBCollection awbAccessConstraints = accessConstraints.AWBConstraints;
// Add constraints
string objectPath = stkobject.ClassName + "/" + stkobject.InstanceName;
IAgAccessCnstrAWB awbConst = awbAccessConstraints.AddConstraint(AgEAWBAccessConstraints.eCstrAWBVectorMag, objectPath + " East Vector") as IAgAccessCnstrAWB;
awbConst.EnableMin = true;
awbConst.Min = 0.0;
IAgAccessCnstrAWB awbConst2 = awbAccessConstraints.AddConstraint(AgEAWBAccessConstraints.eCstrAWBVectorMag, objectPath + " North Vector") as IAgAccessCnstrAWB;
awbConst2.EnableMax = true;
awbConst2.Max = 1000.0;
|
|
Add analysis workbench access constraint from analysis workbanch component
[C#] |
---|
if (stkobject.Vgt.Vectors.Contains("East"))
{
IAgCrdnVector vec = stkobject.Vgt.Vectors["East"];
IAgCrdn crdnVec = vec as IAgCrdn;
IAgAccessConstraintCollection accessConstraints = stkobject.AccessConstraints;
IAgAccessCnstrAWBCollection awbAccessConstraints = accessConstraints.AWBConstraints;
IAgAccessCnstrAWB awbConst = awbAccessConstraints.AddConstraint(AgEAWBAccessConstraints.eCstrAWBVectorMag, crdnVec.QualifiedPath) as IAgAccessCnstrAWB;
awbConst.EnableMin = true;
awbConst.Min = 0.0;
awbConst.EnableMax = true;
awbConst.Max = 1000.0;
}
|
|
Add multiple analysis workbench access constraints of the same type to an STK Object
[Visual Basic .NET] |
---|
Dim accessConstraints As IAgAccessConstraintCollection = stkobject.AccessConstraints
Dim awbAccessConstraints As IAgAccessCnstrAWBCollection = accessConstraints.AWBConstraints
' Add constraints
Dim objectPath As String = stkobject.ClassName + "/" + stkobject.InstanceName
Dim awbConst As IAgAccessCnstrAWB = TryCast(awbAccessConstraints.AddConstraint(AgEAWBAccessConstraints.eCstrAWBVectorMag, objectPath + " East Vector"), IAgAccessCnstrAWB)
awbConst.EnableMin = True
awbConst.Min = 0
Dim awbConst2 As IAgAccessCnstrAWB = TryCast(awbAccessConstraints.AddConstraint(AgEAWBAccessConstraints.eCstrAWBVectorMag, objectPath + " North Vector"), IAgAccessCnstrAWB)
awbConst2.EnableMax = True
awbConst2.Max = 1000
|
|
Add analysis workbench access constraint from analysis workbanch component
[Visual Basic .NET] |
---|
If stkobject.Vgt.Vectors.Contains("East") Then
Dim vec As IAgCrdnVector = stkobject.Vgt.Vectors("East")
Dim crdnVec As IAgCrdn = TryCast(vec, IAgCrdn)
Dim accessConstraints As IAgAccessConstraintCollection = stkobject.AccessConstraints
Dim awbAccessConstraints As IAgAccessCnstrAWBCollection = accessConstraints.AWBConstraints
Dim awbConst As IAgAccessCnstrAWB = TryCast(awbAccessConstraints.AddConstraint(AgEAWBAccessConstraints.eCstrAWBVectorMag, crdnVec.QualifiedPath), IAgAccessCnstrAWB)
awbConst.EnableMin = True
awbConst.Min = 0
awbConst.EnableMax = True
awbConst.Max = 1000
End If
|
|