Copying iProperties from ipt to iam - ilogic

Copying iProperties from ipt to iam - ilogic

pbartosinski
Enthusiast Enthusiast
771 Views
5 Replies
Message 1 of 6

Copying iProperties from ipt to iam - ilogic

pbartosinski
Enthusiast
Enthusiast

Hi,

 

can someone help me. I would like to copy iProperties (Title, Description,Rev) from IPT file do derived assembly IAM created form this IPT. Any ideas?

 

Paweł

0 Likes
Accepted solutions (1)
772 Views
5 Replies
Replies (5)
Message 2 of 6

johnsonshiue
Community Manager
Community Manager

Hi! Let me double-check with your request. You would like to copy the source assembly iProperties to the derive assembly part? Or, you want to copy the derived assembly part iProperties back to the source assembly?

Many thanks!



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
0 Likes
Message 3 of 6

pbartosinski
Enthusiast
Enthusiast

I would like to copy iProp (Title, Description) from ipt file to iam (iam file is created from ipt).

0 Likes
Message 4 of 6

johnsonshiue
Community Manager
Community Manager

Hi! Could you elaborate on what you meant by the assembly is created from the part? Are you saying the part is placed in the assembly? If yes, you can write a simple iLogic rule in the assembly to copy the iProperty from the part to the assembly. Please feel free to share an example here if you cannot figure it out.

Many thanks!



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
0 Likes
Message 5 of 6

pbartosinski
Enthusiast
Enthusiast

Yes i would like to send some iproperties from ipt file to iam file. Can you tell me how to solve it in ilogic?

0 Likes
Message 6 of 6

ThomasB44
Mentor
Mentor
Accepted solution

Hi @pbartosinski 

Here below one of my rules. Smiley Happy

 

'''This rule will copy the iProperties from :
'''The first Assembly, if it's an Assembly
'''Or the first derived Part or Assembly, if it's a Part

Dim oRefName As String
If ThisDoc.Document.DocumentType = kAssemblyDocumentObject Then
	'Define assembly document
	Dim oAsmDoc As AssemblyDocument
	oAsmDoc = ThisDoc.Document
	Dim oAsmDef As AssemblyComponentDefinition
	oAsmDef = oAsmDoc.ComponentDefinition
	Dim oAsmRef As ComponentOccurrence
	'Pick the first item
	oAsmRef = oAsmDef.Occurrences.Item(1)
	oRefName = oAsmRef.Name
Else If ThisDoc.Document.DocumentType = kPartDocumentObject Then
	'Define part document
	Dim oPartDoc As PartDocument
	oPartDoc = ThisDoc.Document
	If oPartDoc.ReferencedDocuments.Count = 0 Then Return
	Dim oDerivedRef As Inventor.Document
	'Pick the first derived document
	oDerivedRef = oPartDoc.ReferencedDocuments(1)
	oRefName = oDerivedRef.DisplayName
Else
	Return
End If
'''Copie les iPropriétés "Résumé"
'Titre
iProperties.Value("Summary", "Title") = _
iProperties.Value(oRefName, "Summary", "Title")
'Objet
iProperties.Value("Summary", "Subject") = _
iProperties.Value(oRefName, "Summary", "Subject")
'Auteur
iProperties.Value("Summary", "Author") = _
iProperties.Value(oRefName, "Summary", "Author")
'Responsable
iProperties.Value("Summary", "Manager") = _
iProperties.Value(oRefName, "Summary", "Manager")
'Société
iProperties.Value("Summary", "Company") = _
iProperties.Value(oRefName, "Summary", "Company")
'Catégorie
iProperties.Value("Summary", "Category") = _
iProperties.Value(oRefName, "Summary", "Category")
'Mots-clés
iProperties.Value("Summary", "Keywords") = _
iProperties.Value(oRefName, "Summary", "Keywords")
'Commentaires
iProperties.Value("Summary", "Comments") = _
iProperties.Value(oRefName, "Summary", "Comments")
'''Copie les iPropriétés "Projet"
'Numéro de pièce
iProperties.Value("Project", "Part Number") = _
iProperties.Value(oRefName, "Project", "Part Number")
'Numéro d'approvisionnement
iProperties.Value("Project", "Stock Number") = _
iProperties.Value(oRefName, "Project", "Stock Number")
'Description
iProperties.Value("Project", "Description") = _
iProperties.Value(oRefName, "Project", "Description")
'Numéro de révision
iProperties.Value("Project", "Revision Number") = _
iProperties.Value(oRefName, "Project", "Revision Number")
'Projet
iProperties.Value("Project", "Project") = _
iProperties.Value(oRefName, "Project", "Project")
'Concepteur
iProperties.Value("Project", "Designer") = _
iProperties.Value(oRefName, "Project", "Designer")
'Ingénieur
iProperties.Value("Project", "Engineer") = _
iProperties.Value(oRefName, "Project", "Engineer")
'Approbateur
iProperties.Value("Project", "Authority") = _
iProperties.Value(oRefName, "Project", "Authority")
'Centre de gestion
iProperties.Value("Project", "Cost Center") = _
iProperties.Value(oRefName, "Project", "Cost Center")
'Coût estimé
iProperties.Value("Project", "Cost") = _
iProperties.Value(oRefName, "Project", "Cost")
'Date de création
iProperties.Value("Project", "Creation Time") = _
iProperties.Value(oRefName, "Project", "Creation Time")
'Constructeur
iProperties.Value("Project", "Vendor") = _
iProperties.Value(oRefName, "Project", "Vendor")
'Lien Web
iProperties.Value("Project", "Catalog Web Link") = _
iProperties.Value(oRefName, "Project", "Catalog Web Link")
'''Copie les iPropriétés "Etat"
'Etat
iProperties.Value("Project", "User Status") = _
iProperties.Value(oRefName, "Project", "User Status")
'Etat de la conception
iProperties.Value("Project", "Design Status") = _
iProperties.Value(oRefName, "Project", "Design Status")
'Vérifié par
iProperties.Value("Project", "Checked By") = _
iProperties.Value(oRefName, "Project", "Checked By")
'Date de vérification
iProperties.Value("Project", "Date Checked") = _
iProperties.Value(oRefName, "Project", "Date Checked")
'Approbation pour conception par
iProperties.Value("Project", "Engr Approved By") = _
iProperties.Value(oRefName, "Project", "Engr Approved By")
'Date d'approbation pour conception
iProperties.Value("Project", "Engr Date Approved") = _
iProperties.Value(oRefName, "Project", "Engr Date Approved")
'Approbation pour fabrication par
iProperties.Value("Project", "Mfg Approved By") = _
iProperties.Value(oRefName, "Project", "Mfg Approved By")
'Date d'approbation pour fabrication
iProperties.Value("Project", "Mfg Date Approved") = _
iProperties.Value(oRefName, "Project", "Mfg Date Approved")
'''Copie les iPropriétés physiques
'Masse
iProperties.Mass = _
iProperties.Mass(oRefName) 

Thomas
Mechanical Designer / Inventor Professional 2025
Inventor Professional EESignature