ilogic Help Please BOM Work Features

ilogic Help Please BOM Work Features

Anonymous
Not applicable
381 Views
2 Replies
Message 1 of 3

ilogic Help Please BOM Work Features

Anonymous
Not applicable

I have the following code and use them with an event Trigger before save.

 

I am wondering if anyone can help me piece together ilogic that I can do the Other to Both Parts & Assemblies regardless of the BOM

 

So what I need is ALL the visiblity of WORK FEATURES OFF and 'ZOOM to EXTENTS and BOM REORDER BY PARTNUMBER

 

 

 

 

_____________________________________________________

 

i = MessageBox.Show("Reorder the BOM by PartNumber", "My iLogic Dialog", MessageBoxButtons.OK, MessageBoxIcon.Hand, MessageBoxDefaultButton.Button1)

'sort parts list
On Error Resume Next
Dim oDrawDoc As DrawingDocument
oDrawDoc = ThisApplication.ActiveDocument


Dim oPartsList1 As PartsList
oPartsList1 = oDrawDoc.ActiveSheet.PartsLists.Item(1)
'If oPartsList1 Is Nothing Then Resume Next


oPartsList1.Sort("PART NUMBER")
oPartsList1.Renumber
_______________________________________________

 

'zoom Extents Code

 

ThisApplication.CommandManager.ControlDefinitions.Item("AppIsometricViewCmd").Execute

 

'BOM ReOrder

________________________________________________

 

0 Likes
382 Views
2 Replies
Replies (2)
Message 2 of 3

MechMachineMan
Advisor
Advisor
Cannot access camera directly. Must use oCam= or something similiar

Dim oCam As Camera

'For the active document
oCam = ThisApplication.ActiveView.Camera

With oCam
.ViewOrientationType()=ViewOrientationTypeEnum.kIsoTopRightViewOrientation
.Fit
.Apply
End With

ThisApplication.ActiveView.Fit(True)

--------------------------------------
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
0 Likes
Message 3 of 3

Anonymous
Not applicable

The code that i have listed between the breaks work by them selves for Reordering the BOM by PartNumber and for Zoom Extents I would like to combine them and also add code to have all Work Features turned off. Than I would add that to a an event trigger before save.

0 Likes