Need to Retrieve Solid Body information - Derived Part

Need to Retrieve Solid Body information - Derived Part

RoyWickrama_RWEI
Advisor Advisor
971 Views
11 Replies
Message 1 of 12

Need to Retrieve Solid Body information - Derived Part

RoyWickrama_RWEI
Advisor
Advisor

I need to retrieve the solid body information from browser of a derived part.

DP.png

I request someone to help me.

Thanks.

0 Likes
Accepted solutions (1)
972 Views
11 Replies
Replies (11)
Message 2 of 12

bradeneuropeArthur
Mentor
Mentor

See one of them in my shortcuts Derive I-properties! :

I can help you with the code if you need..

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 & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
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:
My 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 !


 


EESignature

Message 3 of 12

RoyWickrama_RWEI
Advisor
Advisor

Thanks for the reply. I found a great rule for extracting iProperties to the derived part.

Also, I am trying to extract the solid body name from within the derived part. Please see below:

 

DP-2.png 

 

 

 

 

 

 

Could you help.

Thanks.

0 Likes
Message 4 of 12

bradeneuropeArthur
Mentor
Mentor
I will take a look ASAP. I on my desk again on Tuesday....

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
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:
My 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 !


 


EESignature

0 Likes
Message 5 of 12

RoyWickrama_RWEI
Advisor
Advisor

That's fine. Take your time.

Thanks.

0 Likes
Message 6 of 12

bradeneuropeArthur
Mentor
Mentor
Accepted solution

I think this is what you need:

 

Public Sub SuppressLinkderivedpart()
Dim oInvApp As Inventor.Application
Set oInvApp = ThisApplication
        ' Set a reference to the Active document as a Part
        Dim oInvPartDocument As PartDocument
        Set oInvPartDocument = oInvApp.ActiveDocument

        ' Set a reference to the part component definition
        Dim oInvPartCompDef As PartComponentDefinition
        Set oInvPartCompDef = oInvPartDocument.ComponentDefinition

        ' Set a reference to the derived part component
        Dim oDerivedPart As DerivedPartComponent
        Set oDerivedPart = oInvPartCompDef.ReferenceComponents.DerivedPartComponents.Item(1)

MsgBox oDerivedPart.SolidBodies.Item(1).Name


    End Sub

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 & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
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:
My 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 !


 


EESignature

Message 7 of 12

RoyWickrama_RWEI
Advisor
Advisor

Thanks for the reply. I developed my rule to open and reference document and edit the solid body required. As I have the solid body name (copied to clip board), I have the option to turn all other solid bodies turned off and continue editing.

I was trying to do it for handling parts with multiple derived parts and each derived parts having many solid bodies. for now, I gave up (I am not a good programmer).

Thanks again for your help.

0 Likes
Message 8 of 12

bradeneuropeArthur
Mentor
Mentor
Could you please explain what you try to do more detailed?

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
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:
My 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 !


 


EESignature

0 Likes
Message 9 of 12

RoyWickrama_RWEI
Advisor
Advisor

Thanks for the reply.

I was thinking in case The part has several derived parts with each derived part has more than one solid body incorporated. More than one solid body with a single derived part is likely OK, but I could not do for more than one derived part.

Could you provide me with some guide lines.

You have already solved my problem. Thanks a lot.

 

0 Likes
Message 10 of 12

bradeneuropeArthur
Mentor
Mentor
You can check if you have more than one derived parts by coding and delete one of them! But which are you going to delete?

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
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:
My 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 !


 


EESignature

0 Likes
Message 11 of 12

bradeneuropeArthur
Mentor
Mentor

with this you can:

 

Public Sub DeleteLinkderivedpart()
Dim oInvApp As Inventor.Application
Set oInvApp = ThisApplication
        ' Set a reference to the Active document as a Part
        Dim oInvPartDocument As PartDocument
        Set oInvPartDocument = oInvApp.ActiveDocument

        ' Set a reference to the part component definition
        Dim oInvPartCompDef As PartComponentDefinition
        Set oInvPartCompDef = oInvPartDocument.ComponentDefinition

        ' Set a reference to the derived part component
        Dim oDerivedPart As DerivedPartComponent
        'Set oDerivedPart = oInvPartCompDef.ReferenceComponents.DerivedPartComponents.Item(1)

For Each oDerivedPart In oInvPartCompDef.ReferenceComponents.DerivedPartComponents

Dim msgbresult As String
msgbresult = MsgBox(oDerivedPart.Name, vbYesNo,, "Delete this one?")
If msgbresult = VbYes Then
oDerivedPart.Delete
End If
Next
    End Sub

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
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:
My 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 !


 


EESignature

Message 12 of 12

RoyWickrama_RWEI
Advisor
Advisor

Thanks a lot. Information in this code is greatly helpful in my iLogic purists.

 

0 Likes