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: 

iPropertie

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
GosponZ
401 Views, 3 Replies

iPropertie

Hi,

i have custom iPropertie named partx (ipt level), but i would like value of that propertie to set in Project-Authority on assembly level.

 If i have subassembly which consist 2 -5 parts max. then i have to manualy type value for authority. So i want from subassembly to pull custom value of one part (partx).

Can somebody help please

Thank you

3 REPLIES 3
Message 2 of 4
jdkriek
in reply to: GosponZ

Here's what that looks like in iLogic:

 

Dim oDoc As Document = ThisDoc.Document
Dim oRefDoc As Document
For Each oRefDoc In oDoc.AllReferencedDocuments
	If oRefDoc.DocumentType = kPartDocumentObject Then
		modelName = IO.Path.GetFileName(oRefDoc.FullFileName)
	Try
		' Set the value 
		iProperties.Value("Project", "Authority") = iProperties.Value(modelName, "Custom", "partx")
	Catch
	End Try
	End If
Next
iLogicVb.UpdateWhenDone = True

 You could narrow this down if you know the name of the part each time, otherwise it will just go through all the refrenced documents looking for that property.

Jonathan D. Kriek
MFG Solutions Engineer
KETIV Technologies, Inc.


Message 3 of 4
GosponZ
in reply to: GosponZ

I apreciate this is working perfectSmiley Happy

Thanks

Message 4 of 4
jdkriek
in reply to: GosponZ

You're welcome 😉

Jonathan D. Kriek
MFG Solutions Engineer
KETIV Technologies, Inc.


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

Post to forums  

Autodesk Design & Make Report