Professional Documents
Culture Documents
// Here you should set the specific name, it could also be taken from a KWE
attribute in the Drawing
specificName = "LAYOUT"
//parent = GetPLMOwner(Input)
//Trace(2,"Found GAPrep in #",parent.Name)
}
else
{
// retrieve the part feature to check what is inside
//set tp = Input.PrimaryType
//Trace(2,"primary type of the input #: #",Input.Name, tp.Name)
if Input.IsASortOf("FunctionalBody") == TRUE
{
parent = NULL
}
else
{
parent = Input.Owner
}
//set tp = parent.PrimaryType
//Trace(2,"primary type of the first parent: #",tp.Name)
i = 0
if (parent <> NULL)
{
for i while parent.IsSupporting("PartFeature") <>TRUE and
parent.IsSupporting("FunctionalBody") <>TRUE and i< 10
{
set parent = parent.Owner
if (parent <> NULL)
{
set tp = parent.PrimaryType
//Trace(2,"primary type of the #eme parent: #",i,
tp.Name)
}
else
{
break
}
}
if i>=10
{
Message ("Problem on feature #",Input.Name)
}
}
// We have the part feature, let's scan it
if (parent <> NULL )
{
if (parent.IsSupporting("PartFeature") or
parent.IsSupporting("FunctionalBody"))
{
set elements = parent.Children
for child inside elements
{
// We know there is another set with the specific
name
if (child.Name == specificName)
{
Result = TRUE
ActionList.Append("NoShow()")
//parent = GetPLMOwner(Input)
//Trace(2,"do not show body: # as GAPrep is
found in #",Input.Name, parent.Name)
break
}
}
}
}
}
}
//Message("Name : # , result: # ",Input.Name, Result)