Inventor API - Problem adding Silhouette Curve

Inventor API - Problem adding Silhouette Curve

Anonymous
Not applicable
559 Views
3 Replies
Message 1 of 4

Inventor API - Problem adding Silhouette Curve

Anonymous
Not applicable

I am looking for some help.  I am trying the use the Sketch3D objects SilhouetteCurves object collection in order to get a part's extents and it seems to be failing every time.

 

Here is some example code.

 

// Inventor API client - this is created successfully

CComPtr<Application>

pInvApp;

// Get active document

PartDocumentPtr
partDoc = pInvApp->GetActiveDocument();

 

// Get first surface body item
SurfaceBodyPtr
surfaceBody = partDoc->ComponentDefinition->GetSurfaceBodies()->GetItem(1);

// get first face of the surface body
FacePtr
firstFaceOfSurfaceBody = surfaceBody->GetFaces()->GetItem(1);

// Calculate extents of part
HRESULT
result = sketch3d->SilhouetteCurves->Add(surfaceBody, firstFaceOfSurfaceBody, TRUE);  //<---- This always returns E_FAIL

0 Likes
560 Views
3 Replies
Replies (3)
Message 2 of 4

YuhanZhang
Autodesk
Autodesk

Hi Michael,

 

This should be a bug if the API does not work anyway, an internal tracking ID 178976 was logged for this, you can provide the number to check its status. Please let me if any more questions.



If this solves the problem please click ACCEPT SOLUTION so other people can find it easily.



Rocky Zhang
Inventor API PD
Manufacturing Solutions
Autodesk, Inc.

0 Likes
Message 3 of 4

tomewatkins
Community Visitor
Community Visitor

Hey Rocky,

 

I have a similar problem and was wondering if this problem had been resolved? Where exactly can I use the tracking ID to check for updates?

0 Likes
Message 4 of 4

YuhanZhang
Autodesk
Autodesk

If you are in ADN(Autodesk Developer Network) you can directly query it via sending the tracking ID to our support specialist, or you can post it here that I can help to check its status:).



If this solves the problem please click ACCEPT SOLUTION so other people can find it easily.



Rocky Zhang
Inventor API PD
Manufacturing Solutions
Autodesk, Inc.

0 Likes