tpalsl125
Automotive
- Apr 24, 2015
- 44
Hello, All
I found the below script to insert a Part in a Product.
But I really don't know, how can I get the instance name of inserted Part1?
For example, there is a part in a product. Maybe the tree will be like this.
Product1
ㄴPart1 (Part1.1)
And if I use above the script, then it will be like this.
Product1
ㄴPart1 (Part1.1)
ㄴPart1 (Part1.2) ---> Here is what I want to get the instance name of inserted Part1, "Part1.2".
If I use this script, there is no Selection.
That is reason why I can't get the instance name.
Can anybody help or give me any tips?
I found the below script to insert a Part in a Product.
Code:
Path(0) = "C:\Part1.CATPart"
CATIA.ActiveDocument.Product.Products.AddComponentsFromFiles Path, "All"
But I really don't know, how can I get the instance name of inserted Part1?
For example, there is a part in a product. Maybe the tree will be like this.
Product1
ㄴPart1 (Part1.1)
And if I use above the script, then it will be like this.
Product1
ㄴPart1 (Part1.1)
ㄴPart1 (Part1.2) ---> Here is what I want to get the instance name of inserted Part1, "Part1.2".
If I use this script, there is no Selection.
That is reason why I can't get the instance name.
Can anybody help or give me any tips?