Advanced attribute injection with SET()

SketchUp - Advanced attribute injection with SET()

My purpose in this post is to explain an advanced attribute inclusion method for automating the creation and modification of dynamic components.

Function:
SET ( “attribute”, “option” )
Hidden function syntax:
SET ( “_atributo_funcao” , “option” )

Hidden functions:
label - “STRING”
formalabel - “STRING”
units - DOLLARS, EUROS, YEN, PERCENT, DEGREES, POUNDS, KILOGRAMS, YARDS, METERS, MilliMETERS, CENTIMETERS, FEET, INCHES, STRING, BOOLEAN, INTEGER, FLOAT, DEFAULT
formulaunits - DEFAULT, FLOAT, STRING, INCHES, CENTIMETERS
options - " option1 = value1 & option2 = value2 "
access - NONE / VIEW / TEXTBOX / LIST

// Creates an attribute.
SET(“Test_1”, “”);

// Name the attribute.
SET(“_Test_1_label”,“Test_1”);

// Defines the label for the attribute.
SET(“_Teste_1_formlabel”,“Label”);

// Create a list in the attribute.
SET(“_Teste_1_options”,“One=1&Two=2”);

// Access type. NONE, VIEW, TEXTBOX, LIST
SET(“_Teste_1_access”,“LIST”);

// Defines attribute unit. DEFAULT, FLOAT, STRING, INCHES, CENTIMETERS
SET(“_Teste_1_formulaunits”,“CENTIMETERS”);

// Defines form unit in Component Options.
// Currency: DOLLARS, EUROS, YEN
// Measure: PERCENT, DEGREES, POUNDS, KILOGRAMS, YARDS, METERS, MilliMETERS, CENTIMETERS, FEET, INCHES
// Content: STRING, BOOLEAN, INTEGER, FLOAT, DEFAULT
SET(“_Test_1_units”,“CENTIMETERS”)

// Defines the component unit. INCHES, CENTIMETERS
SET(“_lengthunits”,“CENTIMETERS”)

// Sets/Displays date and time of last modification.
SET(“_lastmodified”,“2024-04-24 10:00”)
=_lastmodified

!!!INCLUSION ORDER!!!
SET("Name",“Hidden Function Test”);
SET("lengthunits",“INCHES”);
SET(“Test_1”,“”);
SET("Teste_1_formlabel",“Information”);
SET("Teste_1_formulaunits",“STRING”);
SET("Test_1_label",“Test_1”);
SET("Teste_1_options",“Option 1=One & Option 2=Two”);
SET("Teste_1_access",“TEXTBOX”);
SET("Test_1_units",“STRING”)
!!!
_____________________________!!!

In this video I explain how the method works in practice (language PT-BR):