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!

EKL - question about CATProducts

Status
Not open for further replies.

solid7

Mechanical
Jun 7, 2005
1,403
US
In EKL (V5), whenever I use a function that needs to access the name of a product, I run into a problem if the instance name is the same. It seems that it treats both CATParts and CATProducts as Products.

So the question is, how would I discern between a CATProduct and a CATPart programmatically?

 
Replies continue below

Recommended for you

In 3DX I have 2 sort of product : Product and 3DPart and I have 2 sort of shape : Shape and Skeleton

the EKL objects to manage product are VPMReference and for Shape we have VPMRepReference.

When used, those objects give me VPMInstance and VPMRepInstance and of course ProductOccurrence.

You could Query VPMRepInstance in your VPMReference.Children if you find one then the Product you have could be a 3DPart.

Note that in 3DX we can associate Shape/Skeleton to the Product , not changing it to a real 3DPart, my trick to look for VPMRepInstance might not be 100% good to identify 3DPart from Product.

As you work with V5, you could check the FullName using VBA / VBScript and find if the product is saved as CATProduct or CATPart...

Eric N.
indocti discant et ament meminisse periti
 
Well, that's not exactly what I want to do. I don't want to confuse the 3DX portion right now, because I'm not using it, at all, presently.

I really just want to be able to use the instance name in assembly context, to delete or rename certain product instances. It's very difficult, though, because when the part and product/component (in an assembly) have the same reference to the instance name, it returns them both in any query or list that I try to return them into. It's a nightmare.

I really just want to know the proper way to get from an instance name, back to its top level owner. So, if a part is dropped into an assemble, it's wrapped up in a product/component, which carries the instance name. But if you look at the properties of the part under the product/component, it ALSO carries the instance name. And even if I search for "Product" when I run my EKL Query or search loop, it still finds the parts. So I always have twice as many objects as I need.

Hope that makes sense. If not, I'll try to clarify further.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top