Error creating top view

Error creating top view

NirantarVidyarthee
Advocate Advocate
524 Views
4 Replies
Message 1 of 5

Error creating top view

NirantarVidyarthee
Advocate
Advocate

I am trying to create front and and top view of a part using VB.Net.

The code works fine with all other parts. How ever only one particular part is giving me problem.(Exception from HRESULT: 0x80070057 (E_INVALIDARG)))

The frontview is created all right, but it refuses to generate top view.

I have tried everything but can't find the clue.

The specific part and sample code (module) is attached.

 

 

0 Likes
Accepted solutions (1)
525 Views
4 Replies
Replies (4)
Message 2 of 5

JaneFan
Autodesk
Autodesk
Accepted solution

Hey @NirantarVidyarthee , 

 

From the original code, the Point2d is at position (14, 13.9825), which is too close the the base view so that the projected view is failed to be created at this point.

Changing this line to enlarge coordinate a little bit can fix it: 

Dim insTvY As Double = fv.Position.Y + (0.685 / 2.0) + 2




Jane Fan
Inventor/Fusion QA Engineer
0 Likes
Message 3 of 5

NirantarVidyarthee
Advocate
Advocate

Thanks @JaneFan, it worked. But is there a way to predict the situation (of 'the point too close') before actually generating the projected view and getting an error? The value 2 may be smaller for some other part and may be too large for some other parts.

0 Likes
Message 4 of 5

JaneFan
Autodesk
Autodesk

A little bit larger than half of base view height is fine, so we can change Y coordinate of project view referencing to base view height, like this:

Dim insTvY As Double
insTvY = fv.Position.Y + (fv.Height / 2#) + 0.2 

 




Jane Fan
Inventor/Fusion QA Engineer
0 Likes
Message 5 of 5

NirantarVidyarthee
Advocate
Advocate

No, its not related to fv.height but tv.Height.

0 Likes