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: 

Copy iPropeties back and forth between part and assy with iLogic

4 REPLIES 4
Reply
Message 1 of 5
LSA-skan
514 Views, 4 Replies

Copy iPropeties back and forth between part and assy with iLogic

I need a simple iLogic code that lets me copy iProperties of my choosing  from my assy and to a Part, and grab som iProperties from my part and put into Assy iProperties.

 

the Assy and part are always named the same, and placed in specific folder, so i can easily locate the files.

 

I have been searching the forum without finding anything i have the skills to adjust to my needs... 😞

 

It should be like this..: (not written in correct code but you´ll get my point.. )

 

'Get partnumber from active assy or part, depending what you have active

PartN = iProperties.Value("Project", "Part Number")

 

'Defining Assy file

Assy = "M:\80000\" & PartN &".iam"

 

'Definging Part file

Part = "M:\80000\" & PartN &".ipt"

 

'Copy iproperty Description

Part.iProperties.Value("Project", "Description") = Assy.iProperties.Value("Project", "Description")

 

'Copy iProperty Custom value Pcs

Assy.iProperties.Value("Custom", "PCS") = Part.iProperties.Value("Custom", "PCS")

 

'save both files

Save part

Save assy

 

If only i knew what to write in the above lines it would work 🙂

Hope someone can help me..!

 

/LSA

4 REPLIES 4
Message 2 of 5
AlexSu
in reply to: LSA-skan

Not really an iLogic code but I have a VBA form that does the copying of iProperties if you're interested...

Regards,
Alex Su
Autodesk Autocad & Inventor 2012 Certified Pro
Autodesk Inventor 2012 Certified Instructor (ACI)
Autodesk Inventor 2012 Certification Evaluator (ACE)
Message 3 of 5
LSA-skan
in reply to: AlexSu

Very much interested.. 😄

 

Please post..!

 

/LSA

Message 4 of 5
AlexSu
in reply to: LSA-skan

Ok, I assume you know how to load *.frm files into Inventor and running it so I attached it here.

Import this form into the Application project folder.

 

To use this form, open the part/assembly file you want to copy properties into then run the form.

In the form, select the source file of the properties and select the property(s) you want to copy and click on copy...

 

Let me know if it works for you.

 

*Rename the attached file from ".doc" to ".zip"

Regards,
Alex Su
Autodesk Autocad & Inventor 2012 Certified Pro
Autodesk Inventor 2012 Certified Instructor (ACI)
Autodesk Inventor 2012 Certification Evaluator (ACE)
Message 5 of 5
LSA-skan
in reply to: AlexSu

Thanks..! i will have a look at this some time this week..!

 

/LSA

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

Post to forums  

Autodesk Design & Make Report