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!

Search results for query: *

  1. bipbophop

    get object from reference vba/c#

    Okay, so in the end it was almost it. selfRef.Parent is not a HybridShape but a SketchBasedShape (a Pad to be exact). To get the real type of the object I used IDisplatch.GetTypeInfo, then ITypeInfo.GetDocumentation, which gives the name of the real type. Now I completely overlooked the fact...
  2. bipbophop

    get object from reference vba/c#

    Sure, here it is: foreach (MECMOD.Constraint c in prod.Connections("CATIAConstraints")) { var elem1 = c.GetConstraintElement(1); var path = elem1.DisplayName.Split('/').TakeWhile(x => !x.StartsWith("!")); var current = prod.Application.Documents.OfType<ProductDocument>().First(x =>...
  3. bipbophop

    get object from reference vba/c#

    Seems to make sense. However it still doesn't work. I successfully get a reference when calling CreateReferenceFromName, but the call to GSMGetObjectFromReference fails with E_FAIL once again.
  4. bipbophop

    get object from reference vba/c#

    Hey, thanks for your answer. Sadly that doesn't work either. When enumerating constraints I'm in the context of the assembly, so not too sure how to get the part to get the HybridShapeFactory. I tried on all the part in the assembly but all I get when calling GSMGetObjectFromReference is an...
  5. bipbophop

    get object from reference vba/c#

    Hello, I'm currently struggling to access constraint references. I'm trying to find the object a reference is pointing to (see http://catiadoc.free.fr/online/interfaces/interface_Constraint.htm => GetConstraintElement). Seems like the only usefull information in the reference object is...

Part and Inventory Search

Back
Top