Identify a CATIA Component from a CATIA Product
Identify a CATIA Component from a CATIA Product
(OP)
Hi there,
I'm working on a CATIA macro that need to check wether the current product is a real product (with its own .CATProduct file) or a component. The tree icon is different, so this must be stored somewhere...
ex :
for i = 1 to prod_count
if CurrentProd.Products.Item(i) <<is a product>> then
<<do stuffs>>
else
if CurrentProd.Products.Item(i) <<is a component>> then
<<do other stuffs>>
end if
end if
Thanks if you can help me,
Victor
I'm working on a CATIA macro that need to check wether the current product is a real product (with its own .CATProduct file) or a component. The tree icon is different, so this must be stored somewhere...
ex :
for i = 1 to prod_count
if CurrentProd.Products.Item(i) <<is a product>> then
<<do stuffs>>
else
if CurrentProd.Products.Item(i) <<is a component>> then
<<do other stuffs>>
end if
end if
Thanks if you can help me,
Victor





RE: Identify a CATIA Component from a CATIA Product
CODE --> CATScript
Regards
Fernando
https://picasaweb.google.com/102257836106335725208 - Romania
https://picasaweb.google.com/103462806772634246699... - EU
RE: Identify a CATIA Component from a CATIA Product
RE: Identify a CATIA Component from a CATIA Product
Try to use
sType = TypeName(products1.Item(i))
sType will be "Product", "Part", "Body", "Document", "Hybridbody", ...
Cheers,
Alex