Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Get Name Of Derived Part Using Inventor VBA Macro

2 REPLIES 2
Reply
Message 1 of 3
isocam
419 Views, 2 Replies

Get Name Of Derived Part Using Inventor VBA Macro

Can anybody help???

Does anybody know how to display the filename of a derived part using a Inventor VBA macro?

Just for test, I have created a part and called it "Part-1.ipt". I have then created a new part called "Part-2.ipt" and inserted the derived part (part-1.ipt) into it.

 

I need a macro that, for testing purposes only, shows the filename of the derived part that I inserted into Part-2.ipt.

 

Many thanks in advance!!!

Darren

2 REPLIES 2
Message 2 of 3
bradeneuropeArthur
in reply to: isocam

Hi.

Take a look in one of my ideas in the signature. About derived parts, and if you like it vote it.

Also I have a sample. I can help you with it earliest Monday.

 

Regards,

Autodesk Software: Inventor Professional 2018 | Vault Professional 2018 | Autocad Mechanical 2018
Programming Skills: Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Dimension Component! | Partlist Export! | Derive I-properties! | Vault Prompts Via API! | Vault Handbook/Manual!
Drawing Toggle Sheets! | Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !

Regards,

Arthur Knoors

Autodesk Affiliations:

Autodesk Software:Inventor Professional 2024 | Vault Professional 2022 | Autocad Mechanical 2022
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:Drawing List!|Toggle Drawing Sheet!|Workplane Resize!|Drawing View Locker!|Multi Sheet to Mono Sheet!|Drawing Weld Symbols!|Drawing View Label Align!|Open From Balloon!|Model State Lock!
Posts and Ideas:Dimension Component!|Partlist Export!|Derive I-properties!|Vault Prompts Via API!|Vault Handbook/Manual!|Drawing Toggle Sheets!|Vault Defer Update!


! For administrative reasons, please mark a "Solution as solved" when the issue is solved !

Message 3 of 3
dgreatice
in reply to: isocam

Public Sub GetNameDerivedPart()
Dim oApp As Application
Dim oPD As PartDocument
Dim oPCD As PartComponentDefinition
Dim oDerPart As DerivedPartComponent

Set oApp = ThisApplication
Set oPD = oApp.ActiveDocument
Set oPCD = oPD.ComponentDefinition

For Each oDerPart In oPCD.ReferenceComponents.DerivedPartComponents
MsgBox (oDerPart.Name)
Next
End Sub

Please use the ACCEPT AS SOLUTION or KUDOS button if my Idea helped you to solve the problem.

Autodesk Inventor Professional Certified 2014

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report