partnumber does not update when placing Ipart

partnumber does not update when placing Ipart

LeanderTorres
Advocate Advocate
206 Views
2 Replies
Message 1 of 3

partnumber does not update when placing Ipart

LeanderTorres
Advocate
Advocate

Hi,

 

Experimenting with some iLogic here. Mainly testing what the possibilities are.

 

I have a rectangular plate with parameters for width, height, thickness and fillet radius.

I would like the part number to update in 2 different formats.

 

when fillet radius is 0:

rectangular plate - <width>x<height>x<thickness>

 

when fillet>0

rectangular plate - <width>x<height>x<thickness> - 4xR<fillet>

 

I have made following iLogic rule:

Dim WidthVal As Double = Parameter("width")
Dim HeightVal As Double = Parameter("height")
Dim FilletVal As Double = Parameter("fillet")
Dim ThickVal As Double = Parameter("thick")


Dim PN1 As String =
	"rectangular plate - " &
	WidthVal & "x" & 
	HeightVal & "x" & 
	ThickVal
	
Dim PN2 As String =
	"rectangular plate - " &
	WidthVal & "x" & 
	HeightVal & "x" & 
	ThickVal &
	" - 4xR" & FilletVal
	

If FilletVal = 0 Then
	Feature.IsActive("corner round1") = False
	iProperties.Value("Project", "Part Number") = PN1
Else
	Feature.IsActive("corner round1") = True
	iProperties.Value("Project", "Part Number") = PN2
End If

 This all works within the part, but when I place it as an iPart it does not update the part number.

I have triggers on: 'anny model parameter change' and  'any user parameter change'

 

Is what I am trying to achieve possible with iparts?

 

I tried edit via spreadsheet but these values are never recalculated.

 

0 Likes
207 Views
2 Replies
Replies (2)
Message 2 of 3

LeanderTorres
Advocate
Advocate

Previous file gave an error when placing, this one works. (for placing, part number still broken) 

0 Likes
Message 3 of 3

WCrihfield
Mentor
Mentor

HI @LeanderTorres.  I do not think this is possible with iParts.  This is because the 'member' model files are ReadOnly, while only the 'factory' is Read/Write.  If you wanted to change something in a member model file, then you would have to do it through the factory file, then 're-generate' the member model file from the factory after the change.  Then an update or replace may be needed at the assembly level, to get the updated/changed member model file.  And generally, iLogic rules are not allowed within iPart member files, just in the factory file, because of how they work.  Maybe just include more members in the factory table, where some have the radius corners, and some do not, and their Part Number value is one of the columns that is configurable, so it will be the way you want.  Then generate member model files for those rows, then include them in your assembly, instead of the other one. 

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes