v4.0
Returns or sets the tags (siTags) on a
parameter. Tags are similar to marked parameters except that you
can use tags to flag a parameter for further processing by a script
or custom command. Also, tags are saved with the scene, unlike
marked parameters.
Tags are easy to query and organize, and you can key, plot, store,
and transfer tags to another program through scripting. You can set
one tag on a parameter or up to 10 tags named Tag1, Tag2, etc. Many
parameters can be tagged with the same Tag value, which allows you
to easily get the list of all parameters for a specific tag.
Note: Unlike the Tag command
which adds tags to the current set of tags on a parameter, this
property is destructive. When you use this property to set the tags
for this parameter, the old tags are completely replaced with the
new specified tags.
Tip: To remove tags without adding any new tags, use siTagNone
(0).
/* This example demonstrates how to manipulate the tags on a parameter */ NewScene( null,false ); var oObj = Application.ActiveSceneRoot.AddGeometry( "Cone", "MeshSurface" ); var oParam = oObj.subdivu; // The parameter shouldn't have any tags, so it should be siTagNone (0) Application.LogMessage( "The parameter's tags are: " + oParam.Tags ); // Set the siTag2 to the parameter oParam.Tags = siTag2; Application.LogMessage( "The parameter's tags are: " + oParam.Tags ); // Set the siTag5 to the parameter, this will remove the siTag2, oParam.Tags = siTag5; Application.LogMessage( "The parameter's tags are: " + oParam.Tags ); // Now set a combination of tags oParam.Tags = siTag5 + siTag3 + siTag6; Application.LogMessage( "The parameter's tags are: " + oParam.Tags ); // Remove all tags oParam.Tags = siTagNone Application.LogMessage( "The parameter's tags are: " + oParam.Tags ); // Expected results: //INFO : The parameter's tags are: 0 //INFO : The parameter's tags are: 2 //INFO : The parameter's tags are: 16 //INFO : The parameter's tags are: 52 //INFO : The parameter's tags are: 0 |