Custom Component interface - toggle_field
Olá nos interfaces dos componentes personalizados do Tekla Structures podemos colocar dropdrown menus que ocultam ou mostram imagens ou outros campos.
Para que isso seja possivel usamos o comando toggle_field como podemos ver nos seguinte texto.
page("TeklaStructures", "")
{
macro(1, "Threaded Rods")
{
tab_page("", "Properties", 1)
{
attribute("P33", "", option, "%s", none, none, "0.0", "0.0", 28, 10, 377, "toggle_field:!P25=1;!P27=1;!P35=0;!P38=1;!P44=1;!P45=1;!P46=0;!P48=0;!P39=1;!P36=0;!P51=1;!P52=1;!Threaded Rod Assembly Main=1;!Threaded Rod Assembly Main2=0")
{
value("Threaded Rod Choice 2.xbm", 1)
value("Threaded Rod Choice 1.xbm", 0)
}
picture("Threaded Rod Assembly Main2", 0, 0, 104, 57)
picture("Threaded Rod Assembly Main", 0, 0, 104, 57)
attribute("P26", "", option, "%s", none, none, "0.0", "0.0", 325, 77, 80)
{
value("No", 0)
value("Yes", 1)
}
parameter("", "P24", distance, number, 28, 88, 80)
attribute("P42", "", option, "%s", none, none, "0.0", "0.0", 325, 110, 80)
{
value("No", 0)
value("Yes", 1)
}
attribute("P43", "", option, "%s", none, none, "0.0", "0.0", 325, 143, 80)
{
value("No", 0)
value("Yes", 1)
}
parameter("", "P25", distance, number, 28, 165, 80)
attribute("P45", "", option, "%s", none, none, "0.0", "0.0", 325, 177, 80)
{
value("No", 0)
value("Yes", 1)
}
attribute("P44", "", option, "%s", none, none, "0.0", "0.0", 325, 210, 80)
{
value("No", 0)
value("Yes", 1)
}
attribute("P27", "", option, "%s", none, none, "0.0", "0.0", 325, 243, 80)
{
value("No", 0)
value("Yes", 1)
}
attribute("P20", "", option, "%s", none, none, "0.0", "0.0", 253, 347, 80)
{
value("M10", 0)
value("M12", 0)
value("M16", 0)
value("M20", 1)
value("M24", 0)
value("M30", 0)
value("M36", 0)
}
attribute("P48", "", option, "%s", none, none, "0.0", "0.0", 325, 440, 80)
{
value("No", 1)
value("Yes", 0)
}
attribute("P38", "", option, "%s", none, none, "0.0", "0.0", 325, 470, 80)
{
value("No", 1)
value("Yes", 0)
}
attribute("P46", "", option, "%s", none, none, "0.0", "0.0", 325, 470, 80)
{
value("No", 1)
value("Yes", 0)
}
attribute("P39", "", option, "%s", none, none, "0.0", "0.0", 325, 500, 80)
{
value("No", 1)
value("Yes", 0)
}
attribute("P36", "", option, "%s", none, none, "0.0", "0.0", 325, 500, 80)
{
value("No", 0)
value("Yes", 1)
}
parameter("", "P35", distance, number, 28, 540, 80)
attribute("P51", "", option, "%s", none, none, "0.0", "0.0", 28, 590, 250, "toggle_field:P52=0")
{
value("Rod length by insertion point", 0)
value("Rod length specified", 1)
}
parameter("", "P52", distance, number, 325, 590, 80)
}
tab_page("", "Attributes", 2)
{
parameter("", "ATT_ASS_NAM", string, text, 190, 7, 200)
parameter("", "ATT_ASS_MAT", material, text, 190, 34, 80)
parameter("", "ATT_ASS_CLA", string, text, 190, 61, 80)
parameter("", "ATT_ASS_FIN", string, text, 190, 88, 80)
parameter("", "ATT_ASS_PR", string, text, 190, 115, 80)
parameter("", "ATT_ASS_NO", integer, number, 190, 142, 80)
parameter("", "ATT_NUT_NAME", string, text, 320, 260, 120)
parameter("", "ATT_TNUT_NAME", string, text, 470, 260, 120)
parameter("", "ATT_W_NAME", string, text, 620, 260, 120)
parameter("", "ATT_ROD_PR", string, text, 170, 287, 80)
parameter("", "ATT_NUT_PR", string, text, 320, 287, 80)
parameter("", "ATT_TNUT_PR", string, text, 470, 287, 80)
parameter("", "ATT_W_PR", string, text, 620, 287, 80)
parameter("", "ATT_ROD_NO", integer, number, 170, 314, 80)
parameter("", "ATT_NUT_NO", integer, number, 320, 314, 80)
parameter("", "ATT_TNUT_NO", integer, number, 470, 314, 80)
parameter("", "ATT_W_NO", integer, number, 620, 314, 80)
attribute("", "-", label, "%s", none, none, "0", "0", 170, 260)
attribute("", "Assemly Name", label, "%s", none, none, "0", "0", 10, 7)
attribute("", "Material", label, "%s", none, none, "0", "0", 10, 34)
attribute("", "Class", label, "%s", none, none, "0", "0", 10, 61)
attribute("", "Finish", label, "%s", none, none, "0", "0", 10, 88)
attribute("", "Assembly Prefix", label, "%s", none, none, "0", "0", 10, 115)
attribute("", "Assembly Start No.", label, "%s", none, none, "0", "0", 10, 142)
attribute("", "Rod", label, "%s", none, none, "0", "0", 170, 230)
attribute("", "Nuts", label, "%s", none, none, "0", "0", 320, 230)
attribute("", "Lock Nuts", label, "%s", none, none, "0", "0", 470, 230)
attribute("", "Washers", label, "%s", none, none, "0", "0", 620, 230)
attribute("", "Part Name", label, "%s", none, none, "0", "0", 10, 260)
attribute("", "Part Prefix", label, "%s", none, none, "0", "0", 10, 287)
attribute("", "Part Start No.", label, "%s", none, none, "0", "0", 10, 314)
}
}
}
{
macro(1, "Threaded Rods")
{
tab_page("", "Properties", 1)
{
attribute("P33", "", option, "%s", none, none, "0.0", "0.0", 28, 10, 377, "toggle_field:!P25=1;!P27=1;!P35=0;!P38=1;!P44=1;!P45=1;!P46=0;!P48=0;!P39=1;!P36=0;!P51=1;!P52=1;!Threaded Rod Assembly Main=1;!Threaded Rod Assembly Main2=0")
{
value("Threaded Rod Choice 2.xbm", 1)
value("Threaded Rod Choice 1.xbm", 0)
}
picture("Threaded Rod Assembly Main2", 0, 0, 104, 57)
picture("Threaded Rod Assembly Main", 0, 0, 104, 57)
attribute("P26", "", option, "%s", none, none, "0.0", "0.0", 325, 77, 80)
{
value("No", 0)
value("Yes", 1)
}
parameter("", "P24", distance, number, 28, 88, 80)
attribute("P42", "", option, "%s", none, none, "0.0", "0.0", 325, 110, 80)
{
value("No", 0)
value("Yes", 1)
}
attribute("P43", "", option, "%s", none, none, "0.0", "0.0", 325, 143, 80)
{
value("No", 0)
value("Yes", 1)
}
parameter("", "P25", distance, number, 28, 165, 80)
attribute("P45", "", option, "%s", none, none, "0.0", "0.0", 325, 177, 80)
{
value("No", 0)
value("Yes", 1)
}
attribute("P44", "", option, "%s", none, none, "0.0", "0.0", 325, 210, 80)
{
value("No", 0)
value("Yes", 1)
}
attribute("P27", "", option, "%s", none, none, "0.0", "0.0", 325, 243, 80)
{
value("No", 0)
value("Yes", 1)
}
attribute("P20", "", option, "%s", none, none, "0.0", "0.0", 253, 347, 80)
{
value("M10", 0)
value("M12", 0)
value("M16", 0)
value("M20", 1)
value("M24", 0)
value("M30", 0)
value("M36", 0)
}
attribute("P48", "", option, "%s", none, none, "0.0", "0.0", 325, 440, 80)
{
value("No", 1)
value("Yes", 0)
}
attribute("P38", "", option, "%s", none, none, "0.0", "0.0", 325, 470, 80)
{
value("No", 1)
value("Yes", 0)
}
attribute("P46", "", option, "%s", none, none, "0.0", "0.0", 325, 470, 80)
{
value("No", 1)
value("Yes", 0)
}
attribute("P39", "", option, "%s", none, none, "0.0", "0.0", 325, 500, 80)
{
value("No", 1)
value("Yes", 0)
}
attribute("P36", "", option, "%s", none, none, "0.0", "0.0", 325, 500, 80)
{
value("No", 0)
value("Yes", 1)
}
parameter("", "P35", distance, number, 28, 540, 80)
attribute("P51", "", option, "%s", none, none, "0.0", "0.0", 28, 590, 250, "toggle_field:P52=0")
{
value("Rod length by insertion point", 0)
value("Rod length specified", 1)
}
parameter("", "P52", distance, number, 325, 590, 80)
}
tab_page("", "Attributes", 2)
{
parameter("", "ATT_ASS_NAM", string, text, 190, 7, 200)
parameter("", "ATT_ASS_MAT", material, text, 190, 34, 80)
parameter("", "ATT_ASS_CLA", string, text, 190, 61, 80)
parameter("", "ATT_ASS_FIN", string, text, 190, 88, 80)
parameter("", "ATT_ASS_PR", string, text, 190, 115, 80)
parameter("", "ATT_ASS_NO", integer, number, 190, 142, 80)
parameter("", "ATT_NUT_NAME", string, text, 320, 260, 120)
parameter("", "ATT_TNUT_NAME", string, text, 470, 260, 120)
parameter("", "ATT_W_NAME", string, text, 620, 260, 120)
parameter("", "ATT_ROD_PR", string, text, 170, 287, 80)
parameter("", "ATT_NUT_PR", string, text, 320, 287, 80)
parameter("", "ATT_TNUT_PR", string, text, 470, 287, 80)
parameter("", "ATT_W_PR", string, text, 620, 287, 80)
parameter("", "ATT_ROD_NO", integer, number, 170, 314, 80)
parameter("", "ATT_NUT_NO", integer, number, 320, 314, 80)
parameter("", "ATT_TNUT_NO", integer, number, 470, 314, 80)
parameter("", "ATT_W_NO", integer, number, 620, 314, 80)
attribute("", "-", label, "%s", none, none, "0", "0", 170, 260)
attribute("", "Assemly Name", label, "%s", none, none, "0", "0", 10, 7)
attribute("", "Material", label, "%s", none, none, "0", "0", 10, 34)
attribute("", "Class", label, "%s", none, none, "0", "0", 10, 61)
attribute("", "Finish", label, "%s", none, none, "0", "0", 10, 88)
attribute("", "Assembly Prefix", label, "%s", none, none, "0", "0", 10, 115)
attribute("", "Assembly Start No.", label, "%s", none, none, "0", "0", 10, 142)
attribute("", "Rod", label, "%s", none, none, "0", "0", 170, 230)
attribute("", "Nuts", label, "%s", none, none, "0", "0", 320, 230)
attribute("", "Lock Nuts", label, "%s", none, none, "0", "0", 470, 230)
attribute("", "Washers", label, "%s", none, none, "0", "0", 620, 230)
attribute("", "Part Name", label, "%s", none, none, "0", "0", 10, 260)
attribute("", "Part Prefix", label, "%s", none, none, "0", "0", 10, 287)
attribute("", "Part Start No.", label, "%s", none, none, "0", "0", 10, 314)
}
}
}
Comentários
Enviar um comentário