×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

How to Select a V5 Product in code

How to Select a V5 Product in code

How to Select a V5 Product in code

(OP)
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?

RE: How to Select a V5 Product in code

Something like this

set oSel = oDocument.selection
oSel.add oProduct
oSel.visproperties.SetRealColour 255,255,255,0

RE: How to Select a V5 Product in code

(OP)
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,

RE: How to Select a V5 Product in code

(OP)
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,

RE: How to Select a V5 Product in code

Better read the automation docs again, they are very good once you can work them.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources