In this example im trying to build a list of components within an assembly and populate a list for a bom thre last line i did what you surgested make PointList=FinalList and i get the following error
Syntax Error Line 90: Parameter PointList cannot be used in this context
Madaxe
/*Rule created by madaxe 05/12/08 MyPart art*/
Let MyPartList(List)
Let MyProdList(List)
Let FinalList(List)
Let MyPartName(String)
Let MySize(Integer)
Let I(Integer)
Let ListItem(String)
Let MyListPart(Part)
Let MyListAssy(Assemble)
Let Len(Integer)
/*####################### Get Root Node From A Direct Child Sub Assembly #####################*/
MyProdList = MyProduct -> Query("Assembly",""
I = 1
For I While I <= MyProdList -> Size()
{
MyListAssy = MyProdList -> GetItem(I)
ListItem = MyListAssy.Owner.Name
Len = ListItem->Search(".CAT"
if Len <> -1
{
MyProdList ->RemoveItem(I)
}
}
I = 1
For I While I <= MyProdList -> Size()
{
MyListAssy = MyProdList -> GetItem(I)
FinalList -> AddItem(MyListAssy.Owner,1)
/*Message("#",FinalList -> GetItem(I))*/
}
/*###############################################################################*/
MyPartList = MyPart.Owner->Query("Part",""
I = 1
For I While I <= MyPartList -> Size()
{
MyListPart =MyPartList -> GetItem(I)
ListItem = MyListPart.Owner.Name
Len = ListItem->Search(".CAT"
if Len <> -1
{
MyPartList ->RemoveItem(I)
}
}
I = 1
For I While I <= MyPartList -> Size()
{
MyListPart = MyPartList -> GetItem(I)
FinalList -> AddItem(MyListPart,I+1)
}
/*###############################################################################*/
MySize = FinalList->Size()
Message("#","My List Size = " + MySize)
I = 1
For I While I <= FinalList -> Size()
{
MyListPart = MyPartList -> GetItem(I)
Message("#",MyListPart.Name)
}
/*###############################################################################*/
PointList=FinalList
|