Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
vitor2HXBF
in reply to: vitor2HXBF

@A.Acheson  I want to prevent others from changing the filename without changing the iProperties partnumber, this worked as the link suggested  "How to update iProperties Part Number so that it always reflect the current file name". the exception is when i try saving an iPart.

 

There is nothing much to say besides repeating the article steps. Then follow this steps from your Part:

Save as filename.ipt > Manage > Create iPart > insert Row 

Now the child PartNumber is filename-01, filename-02.

Run article's Rule0 (iProperties.Value("Project", "Part Number")= ThisDoc.FileName) 

Now the child PartNumber is "filename" and not "filename-01".

if you try to change the iPart child in the Table, this is the prompt:

vitor2HXBF_1-1657798470929.png

 

 I work aroud the Rule0 to check if is iPart then it will not override the PartNumber:

	oPartDoc = ThisApplication.ActiveDocument    
	If oPartDoc.ComponentDefinition.IsiPartFactory _
	Or oPartDoc.ComponentDefinition.IsiPartMember Then
	
	'Basically I want this
	
	Else
	iProperties.Value("Project", "Part Number") = ThisDoc.FileName
	End If

 I want that commented line of code that considers Indexes