iPropertie

iPropertie

GosponZ
Collaborator Collaborator
491 Views
3 Replies
Message 1 of 4

iPropertie

GosponZ
Collaborator
Collaborator

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

0 Likes
Accepted solutions (1)
492 Views
3 Replies
Replies (3)
Message 2 of 4

jdkriek
Advisor
Advisor
Accepted solution

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.


0 Likes
Message 3 of 4

GosponZ
Collaborator
Collaborator

I apreciate this is working perfectSmiley Happy

Thanks

0 Likes
Message 4 of 4

jdkriek
Advisor
Advisor

You're welcome 😉

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


0 Likes