let PrimaryType(type)
let lstType,lstTypeAdd(List)
Let ValuePointer1,ValuePointer2(ValuePointer)
PrimaryType=ThisObject.PrimaryType
if PrimaryType.Name =="DELAsmFastenFunctionRef"
{
lstType.Append("A")
lstType.Append("B")
lstType.Append("C")
ValuePointer1=ThisObject.GetAttributeValuePointer("Test_Test")
ValuePointer1.AuthorizedValues=lstType
if ThisObject.HasAttribute("Test_TestA")
{
if ThisObject.GetAttributeString("Test_Test") =="A"
{
lstTypeAdd.Append("A-1")
lstTypeAdd.Append("A-2")
ValuePointer1=ThisObject.GetAttributeValuePointer("Test_TestA")
ValuePointer1.AuthorizedValues=lstTypeAdd
}
if ThisObject.GetAttributeString("Test_Test") =="Type B"
{
lstTypeAdd.Append("A-2")
lstTypeAdd.Append("A-C")
ValuePointer1=ThisObject.GetAttributeValuePointer("Test_TestA")
ValuePointer1.AuthorizedValues=lstTypeAdd
}
}
This needs to be achieved through the above business logic.
When the value of the Test attribute is A, the value of the TestA attribute can only be A-1 or A-2;
When the value of the Test attribute is B, the value of the TestA attribute can only be A-2 or A-C;
When TestA is A-1/A-2, the attribute TestC is empty;
When TestA is A-C, the attribute TestC can have either an empty value or C-1.
Could everyone help to modify the code?
