AnsweredAssumed Answered

How to change from inserting 3-view to single view in drawing

Question asked by Tommy Stypula on Mar 22, 2020
Latest reply on Mar 24, 2020 by Deepak Gupta

I found the attached macro during previous searches for automatic generation of drawings for each configuration of a part file.  Basically it takes a model with multiple configurations and generates a drawing file with one sheet for each config, and it names the sheets as a custom property, in this case "description".  The issue is that it inserts the "3-views" of the model, whereas I want to insert a single view, like the "Top" view, or "Front" view.  If the view that it chooses was selectable using an input field that would be even better!  But it's not critical.

 

I am not very good with macros - I have searched all over which has lead me to try substituting some other commands, like DropDrawingViewFromPalette2, CreateDrawViewFromModelView3, and InsertModelInPredefinedView with no luck (I can't get the macro to run with those inserted), but like I said I don't really know what I am doing.

 

Here is the current code that inserts the 3 views:

 

If ThirdAngle = True Then
retval = swDraw.Create3rdAngleViews2(swModel.GetPathName)
Else
retval = swDraw.Create1stAngleViews2(swModel.GetPathName)
End If

 

As a last note, if there was a way to make it insert sheet metal parts in the flat pattern form/config that would be awesome, but again, this isn't critical.  For non-sheet metal parts I could choose the correct view for cutting.

Outcomes