• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

attributes with ilogic

  • Thread starter Thread starter and
  • Start date Start date

and

Guest
How can I create a personal attribute with these attributes ordered in increasing order?
I have done this function, but I am not in order of magnitude...
iproperties.value("custom", "misure_ingombro") = (measure.extentslength) & "x" & (measure.extentswidth) & "x" & (measure.extsheight)).tostring

example the measurements of a piece :
measure.extentslength = 10
measure.extentswidt = 7
measure.extentsheight =14

the result of my function is:

measures_engrave = 10x7x14

I would like to ask you more:
measures_engrave = 7x10x14

How can I do with an ilogic function?
 
How can I create a personal attribute with these attributes ordered in increasing order?
I have done this function, but I am not in order of magnitude...
iproperties.value("custom", "misure_ingombro") = (measure.extentslength) & "x" & (measure.extentswidth) & "x" & (measure.extsheight)).tostring

example the measurements of a piece :
measure.extentslength = 10
measure.extentswidt = 7
measure.extentsheight =14

the result of my function is:

measures_engrave = 10x7x14

I would like to ask you more:
measures_engrave = 7x10x14

How can I do with an ilogic function?
This is part of an ilogic rule I use:

Code:
l = round(fp.length*10 ,1)   
w = round(fp.width*10 ,1)       

h = osmcd.thickness.value*10

dim olist as new arraylist
olist.add(l)
olist.add(w)
olist.add(h)

call olist.sort()

iproperties.value(oocc.name, "custom", "length")= olist.item(2)
iproperties.value(oocc.name,"custom", "width") = olist.item(1)
iproperties.value(oocc.name, "custom", "thickness") = olist.item(0)
smallest = olist.item(0)
middle = olist.item(1)
largest = olist.item(2)
iproperties.value(oocc.name, "custom", "stocksize") = largest & " x " & middle & " x " & smallest & " "
I'm sure you can figure out how to change for your case.
 
This is part of an ilogic rule I use:

Code:
l = round(fp.length*10 ,1)  
w = round(fp.width*10 ,1)      

h = osmcd.thickness.value*10

dim olist as new arraylist
olist.add(l)
olist.add(w)
olist.add(h)

call olist.sort()

iproperties.value(oocc.name, "custom", "length")= olist.item(2)
iproperties.value(oocc.name,"custom", "width") = olist.item(1)
iproperties.value(oocc.name, "custom", "thickness") = olist.item(0)
smallest = olist.item(0)
middle = olist.item(1)
largest = olist.item(2)
iproperties.value(oocc.name, "custom", "stocksize") = largest & " x " & middle & " x " & smallest & " "
I'm sure you can figure out how to change for your case.
you can help me that I am inexperienced!!!
Thank you.
 
ecco il mio codice...

iproperties.value("custom", "misure_ingombro") = ((measure.extentslength) & "x" & (measure.extentswidth) & "x" & (measure.extentsheight)).tostring
 
ecco il mio codice...

iproperties.value("custom", "misure_ingombro") = ((measure.extentslength) & "x" & (measure.extentswidth) & "x" & (measure.extentsheight)).tostring
can you send the file (ipt or iam) that contains the code? You said you tried, and it's not in order.
 
questo dovrebbe fare:
Code:
l = (round(measure.extentslength, 2))
w = (round(measure.extentswidth, 2))   
h = (round(measure.extentsheight, 2))

dim olist as new arraylist
olist.add(l)
olist.add(w)
olist.add(h)

call olist.sort()

iproperties.value("custom", "length") = olist.item(2)
iproperties.value("custom", "width") = olist.item(1)
iproperties.value("custom", "height") = olist.item(0)



smallest = olist.item(0)
middle = olist.item(1)
largest = olist.item(2)



iproperties.value("custom", "misure_ingombro") = largest & " x " & middle & " x " & smallest & "mm"
 
..perfetto .. molto simile al mio ..
ho tolto solo le righe :
iproperties.value("custom", "length") = olist.item(2)
iproperties.value("custom", "width") = olist.item(1)
iproperties.value("custom", "height") = olist.item(0)

per non creare i 3 parametri separati !

grazie mille
 
How can I compute these iproperties for all the children of a group?
without having to open one by one and run ilogic?
 
Last edited by a moderator:

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
Back
Top