Add the sketch using DrawingView Sketches when creating a section view

By Wayne Brill

In the SDK help–>Inventor API User’s Manual—-> Drawings—>Working With Drawing Views—> “Creating a section drawing view” it includes this code:

Dim oDrawingSketch As DrawingSketch
Set oDrawingSketch = oSheet.Sketches.Add

AddSectionView() fails when the Drawing Sketch is added using the Sheet Sketches.

If the DrawingSketch is added using the View Sketches the error goes away and the Section View is created.

Dim oDrawingSketch As DrawingSketch
’ Error goes away on AddSectionView() using the base view sketches collection
Set oDrawingSketch = oView1.Sketches.Add

This issue with the sample in the SDK help has been reported to Inventor Engineering.


Comments

Leave a Reply

Discover more from Autodesk Developer Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading