Accessing Objects Hidden in API - Tweak Collection in ipn

Accessing Objects Hidden in API - Tweak Collection in ipn

MechMachineMan
Advisor Advisor
428 Views
0 Replies
Message 1 of 1

Accessing Objects Hidden in API - Tweak Collection in ipn

MechMachineMan
Advisor
Advisor

Hi there, I'm writing a macro that allows me to select and object in an ipn environment and returns a list in a message box of all the tweaks the part is used in.

 

In looking through the exposed API, from what I can tell the parts used in an ipn only contain information about the translation, and not about the actual tweak.

 

However, each tweak does contain information about the sub components.

 

So I am planning on iterating through each tweak and returning it if it references the component I have active in my select set.

 

HOWEVER,

 

Looking through the API, it seems the only collection of tweaks I can access that are visible are through the browser nodes. Which is clunky and inefficient.

 

Looking through the PARENTS of the tweaks,

It leads me through this maze of file types:

 

(PublicationTweakDefinition) > (PublicationMarkedView) > (Publication) > (PresentationDocument) > (Application)

 

So ideally, I would like to get the collection of PublicationTweakDefinitions.

 

However, as soon as I try to call

 

oDoc.Publications() it asks for the arguement of context, which is not documented anywhere in the API nor the Object Browser.

 

How am I supposed to proceed from here?


--------------------------------------
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
429 Views
0 Replies
Replies (0)