Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to retrieve the active product object 3

Status
Not open for further replies.

USB Memory

Mechanical
May 28, 2020
44
Hi all

Does someone know how to retrieve the active product object?
Active product means that the product is in editing.

for example.
Red circle product is in editing (active product) bellow.
Sample1_srs8td.png


I know there is activedocument Property but the property gives only top product document.
 
Replies continue below

Recommended for you

Code:
Dim sel: set sel = CATIA.ActiveDocument.Selection
sel.Clear
sel.Search "CATAsmSearch.Product,in"
Dim activeProduct: set activeProduct = sel.Item(1).LeafProduct
sel.Clear
 
I do not understand this very well.....Why don't you just double-click on the product you want to activate/edit?....

CAD 2015
 
Thank you, Little Cthulhu.
I did well as you mentioned.
Is the product object definitely put in item(1)?
As far as I Checked, item(1) has the active product but other items don't have it.

Thanks
 
Thank you, CAD2015
Is it possible to retrieve the active product "object" by double-click on the product?
If it is possible, I would like to know the way as well.

Thanks
 
Thank you, ferdo

I watched the link you attached but it is not working as my image
Little Cthulhu's solution perfectly match what i want to do.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor