Sheet metal flat patterns on same drawing using ilogic?

Sheet metal flat patterns on same drawing using ilogic?

Anonymous
Not applicable
489 Views
1 Reply
Message 1 of 2

Sheet metal flat patterns on same drawing using ilogic?

Anonymous
Not applicable

I've looked through some examples but can't find code which mimics placing the base component as a flat pattern, running the rule from within the drawing.

 

The example below shows a path to a saved part - I think i need to identify the currently open part.(i don't want to type in the saved location of each part)..take the currently open part, place the flat pattern & close, next..

 

 

flat1.JPG

 

 

the next step is to place a second flat part on the same dwg.

Most of the examples I've found create a new drawing - I'd like to keep the one currently open.

 

Any suggestions welcome.

 

My current workflow is pretty repetitive, select the part, select flat pattern, select scale (1:1), position & repeat. The result is one dwg with a range of developed sheet metal parts ready for nesting & cutting.

 

Thanks

 

Andrew

 

0 Likes
490 Views
1 Reply
Reply (1)
Message 2 of 2

wayne.brill
Collaborator
Collaborator

Hi Andrew,

 

The DrawingViews.AddBaseView Method can be called repeatedly using the DrawingViews object of the currently open drawing. (the SheetMetalFoldedModel in the AdditionalOptions NameValueMap determines the view will created with the flat pattern).

 

The question seems to be where are the part files? Are they components of an assembly that is open? If so you could iterate through the components and get the part files to use for the views. See the AssemblyCount() VBA example in the API help.

 

Also where would the point for the views come from?

 

Calling DrawingViews.AddBaseView multiple times with a different part and location should do what you are doing manually.  This API help example may be helpful: AddFlatPatternDrawingView()

 

Also maybe an app from the appstore could be a solution.

https://apps.autodesk.com/INVNTOR/en/Detail/Index?id=161171054285177662&appLang=en&os=Win32_64

 

 

Thanks,

Wayne

 



Wayne Brill
Developer Technical Services
Autodesk Developer Network

0 Likes