Copy all iProperties from Mirrored Part

Copy all iProperties from Mirrored Part

donaldleigh
Advocate Advocate
551 Views
3 Replies
Message 1 of 4

Copy all iProperties from Mirrored Part

donaldleigh
Advocate
Advocate

Hi all

 

I have found this rule in the forum here and I would like not only copy the custom iProperties but all the iProperties.

 

Is anyone able to help me out.

 

Cheers

Donald (Inventor 2014)

 

 

0 Likes
552 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable

When you create a symmetric part in assembly, it automatically
The property is copied ...
Why?

0 Likes
Message 3 of 4

Sergio.D.Suárez
Mentor
Mentor

Hi, here you have an ilogic code, I think it could work.
I try to simplify it a bit by taking the information from your original code.

 

Dim oDerPro As Inventor.Property
Dim oDerived As Inventor.Document = ThisApplication.ActiveDocument

If oDerived.ReferencedDocuments.Count = 0 Then Exit Sub

Dim oReferenced As Inventor.Document = oDerived.ReferencedDocuments(1)

For Each oRefPro As Inventor.Property In oReferenced.PropertySets.Item("Inventor Summary Information")
	Try
   oDerived.PropertySets.Item("Inventor Summary Information")(oRefPro.Name).Value = oRefPro.Value
   Catch
   End Try
Next
For Each oRefPro As Inventor.Property In oReferenced.PropertySets.Item("Inventor Document Summary Information")
	Try
   oDerived.PropertySets.Item("Inventor Document Summary Information")(oRefPro.Name).Value = oRefPro.Value
   Catch
   End Try
Next
For Each oRefPro As Inventor.Property In oReferenced.PropertySets.Item("Design Tracking Properties")
	Try
   oDerived.PropertySets.Item("Design Tracking Properties")(oRefPro.Name).Value = oRefPro.Value
   Catch
   End Try
Next

If you want this code combined with your previous code, you could try this new code

 

Dim oDerPro As Inventor.Property
Dim oDerived As Inventor.Document = ThisApplication.ActiveDocument

If oDerived.ReferencedDocuments.Count = 0 Then Exit Sub

Dim oReferenced As Inventor.Document = oDerived.ReferencedDocuments(1)

For Each oRefPro As Inventor.Property In oReferenced.PropertySets.Item("Inventor Summary Information")
	Try
   oDerived.PropertySets.Item("Inventor Summary Information")(oRefPro.Name).Value = oRefPro.Value
   Catch
   End Try
Next
For Each oRefPro As Inventor.Property In oReferenced.PropertySets.Item("Inventor Document Summary Information")
	Try
   oDerived.PropertySets.Item("Inventor Document Summary Information")(oRefPro.Name).Value = oRefPro.Value
   Catch
   End Try
Next
For Each oRefPro As Inventor.Property In oReferenced.PropertySets.Item("Design Tracking Properties")
	Try
   oDerived.PropertySets.Item("Design Tracking Properties")(oRefPro.Name).Value = oRefPro.Value
   Catch
   End Try
Next





Dim oDerProps As PropertySet = oDerived.PropertySets.Item("Inventor User Defined Properties")

Dim oProList() As String = {"*", "OTHER_iPRO" }

For Each oRefPro As Inventor.Property In oReferenced.PropertySets.Item("Inventor User Defined Properties")
    
    'Check for existing, add if not existing
    Dim oSkip As Boolean = True
    For Each ProName As String In oProList
        'Ucase ignores upper/lower case in names
        If UCase(ProName) <> UCase(oRefPro.Name) And ProName <> "*" Then Continue For
        oSkip = False
        Exit For

'Copy from derived properties to current properties
    Next
    If oSkip Then Continue For
    Try
        oDerPro = oDerProps(oRefPro.Name)
    Catch
        oDerPro = oDerProps.Add("", oRefPro.Name)
    End Try
    oDerPro.Value = oRefPro.Value
Next

 I hope this helps with your problem. Regards


Please accept as solution and give likes if applicable.

I am attaching my Upwork profile for specific queries.

Sergio Daniel Suarez
Mechanical Designer

| Upwork Profile | LinkedIn

0 Likes
Message 4 of 4

bradeneuropeArthur
Mentor
Mentor

Hi @donaldleigh 

 

You could vote the following idea for this feature to be implemented!
 Derive I-properties! 

Regards,

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