Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

How to Select a V5 Product in code

Status
Not open for further replies.

kyeohti

Mechanical
Jun 13, 2005
9
I'm having trouble with the SetRealColor method with respect to my product. Largely, the problem is that my object is a product object and the method expects a selection object. How do I convert my product object into a selection object? In VBA, this would be trivial (Product1.Select) but in CATIA, the product object doesn't support a .Select method. What can I do?
 
Replies continue below

Recommended for you

Something like this

set oSel = oDocument.selection
oSel.add oProduct
oSel.visproperties.SetRealColour 255,255,255,0
 
Thanks for responding. Are you sure this doesn't create a new product and place it last in the selection? I will try it again but I don't want to put any products that aren't already in structure.

Cheers,
 
Well ILB! It works! ... HUH! With as much as I tried, I'm surprised I hadn't tried that too... Also, the Automation Docs sure gave me the impression that .add wasn't going to do anything desireable. Thanks again for your help...

Cheers,
 
Better read the automation docs again, they are very good once you can work them.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor