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: 

Copying properties from assembly to parts

2 REPLIES 2
Reply
Message 1 of 3
drguitarum2005
271 Views, 2 Replies

Copying properties from assembly to parts

I think this has been asked before but I haven't found a total solution.

 

When I make a drawing, often times page 1 will be the entire assembly and in subsequent pages (sheets), I will dimension each individual component, etc. In the "Name" field in my title block, I have it grabbing the "Title" and "Subject" iProperties. Just so happens, those fields are ALWAYS the same for each part as it is for the assembly.

 

What is the best way I can either 

 

A) AUTOMATICALLY copy the "Title" and "Subject" iProperty fields from the assembly to EACH part that makes it up

 

or even BETTER

 

B) AUTOMATICALLY copy the "Title" and "Subject" information from sheet 1 to the same place on all subsequent sheets

 

Or BEST

 

C) Have the title block template pull that data from the assembly, EVEN IF only a singloe part is on the sheet.

 

2 REPLIES 2
Message 2 of 3

The best I have so far is below, but it's not quite doing what I want. WHere it says "Sheet1"...I don't know how to actually pick sheet 1 (I don't want the active sheet, I always want sheet 1)

 

I like what this is doing...creating a custom property called "Name Param" from the "Title" property of the main assembly. I'd rather do it this way than actually copy the assembly property to each part property.

 

Any help?

 

iProperties.Value("Custom", "Name Param") = String.Empty
oRefDoc = Sheet1.View("VIEW1").ModelDocument
iProperties.Value("Custom", "Name Param") = iProperties.ValueInDoc(oRefDoc, "Project", "Title")
Message 3 of 3

Hi There,

 

You can access the first sheet in a drawing using DrawingDocument.Sheets(1). You can then set a field in the title block to display a specific iProperty value.

 

Let me know if that answers your question or you need further help.

 

Regards,

Philippe.



Philippe Leefsma
Developer Technical Services
Autodesk Developer Network

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

Post to forums  

Autodesk Design & Make Report