Nicolas Chevalier
Nicolas Chevalier

Reputation: 13

CATIA V5 CAA : how to set a connector of a CATIEhiBranchable?

I'm trying to add by code connectors and a path to a branchable. If the extremities are points, with or without tangents, there is no problem by going through the GSM spline, but if I want to add a full product as a connector with the AddSupport method directly on the branchable, it fails with an E_INVALIDARG.

virtual HRESULT AddSupport( CATIProduct * iSupport, 
                          CatEhiSupportMode iSupportMode, 
                          int * num,
                          CatEhiInsertMode iCurveMode  = catEhiInsertAfter) = 0;

The product I give as first arg is the good one (I checked the instance name, and manually it works, so it obviously contains the right electrical publications), I tried both CatEhiSupportMode, the given index and the insert mode are good.

Adding another support between the two extremities is fine, so I assume getting the right product is not the issue.

If I add point extremities and other supports by code, the branchable is fine, and then if I manually remove the points extremities and add the real connectors, everything works as expected. So something is off in the code, but no clue where to really search...

Upvotes: 0

Views: 15

Answers (0)

Related Questions