Flat Pattern VBA Editor

Flat Pattern VBA Editor

Anonymous
Not applicable
743 Views
2 Replies
Message 1 of 3

Flat Pattern VBA Editor

Anonymous
Not applicable

i Need help on getting flat pattern. The code below works in ilogic, but i need it to run straight from the VBA editor. 

 

Dim oBaseViewOptions As Inventor.NameValueMap
Set oBaseViewOptions = ThisApplication.TransientObjects.CreateNameValueMap
'
''True = folded view
''False = flat pattern view
oBaseViewOptions.Add("SheetMetalFoldedModel", False)

' Create the drawing view.
Dim oView1 As DrawingView
Set oView1 = oSheet.DrawingViews.AddBaseView(oPartDoc, oPoint1, 1#, kDefaultViewOrientation, kHiddenLineDrawingViewStyle, , , oBaseViewOptions)

0 Likes
Accepted solutions (1)
744 Views
2 Replies
Replies (2)
Message 2 of 3

MechMachineMan
Advisor
Advisor
Accepted solution

SYNTAX: the arrangement of words and phrases to create well-formed sentences in a language.

 

What you are trying:

oBaseViewOptions.Add("SheetMetalFoldedModel", False)

What should work:

Call oBaseViewOptions.Add("SheetMetalFoldedModel", False)

OR

oBaseViewOptions.Add "SheetMetalFoldedModel", False

 

See linked discussion:

https://stackoverflow.com/questions/5413765/what-are-the-rules-governing-usage-of-brackets-in-vba-fu...


--------------------------------------
Did you find this reply helpful ? If so please use the 'Accept as Solution' or 'Like' button below.

Justin K
Inventor 2018.2.3, Build 227 | Excel 2013+ VBA
ERP/CAD Communication | Custom Scripting
Machine Design | Process Optimization


iLogic/Inventor API: Autodesk Online Help | API Shortcut In Google Chrome | iLogic API Documentation
Vb.Net/VBA Programming: MSDN | Stackoverflow | Excel Object Model
Inventor API/VBA/Vb.Net Learning Resources: Forum Thread

Sample Solutions:Debugging in iLogic ( and Batch PDF Export Sample ) | API HasSaveCopyAs Issues |
BOM Export & Column Reorder | Reorient Skewed Part | Add Internal Profile Dogbones |
Run iLogic From VBA | Batch File Renaming| Continuous Pick/Rename Objects

Local Help: %PUBLIC%\Documents\Autodesk\Inventor 2018\Local Help

Ideas: Dockable/Customizable Property Browser | Section Line API/Thread Feature in Assembly/PartsList API Static Cells | Fourth BOM Type
Message 3 of 3

Anonymous
Not applicable

i am trying 

oBaseViewOptions.Add("SheetMetalFoldedModel", False)

i just added the call before oBaseViewOptions and it worked.

 

 

thanks 

0 Likes