Customize a TEXT tag
Attached to Operator
How to Operator moves in all directions, TEXT label fixed orientation?
You can use the 'On Pre Draw' trigger of the operator to adjust the text's position for every frame, so it always appears in the same position/orientation relative to the operator's center point.
In the attached model are two examples: For operator1, the text is a subnode of the operator, for operator2 it is not. The needed code is easier for the second option, since all that is needed is to adjust the location based on a fixed offset to the operator. In the first case, the operator's rotation has to be compensated.
What exactly do you mean with "fit text tag in operator"? You can change the size of the text in its properties.
The On Pre Draw trigger in the model moves the tag to a fixed position relative to the operator before every frame is drawn, so any position change you attempt is immediately overwritten.
To adjust the location it is moved to you have to change the parameters in the setLocation command. Currently the location is determined as the center point of the operator plus a fixed offset.
(This is the code for Operator2, Operator1 is similar, but the offset is determined based on the operator's rotation)
7 People are following this question.
FlexSim can help you understand and improve any system or process. Transform your existing data into accurate predictions.
FlexSim is a fully 3D simulation software environment. FlexSim can be used to simulate any process in any industry.
FlexSim®, FlexSim Healthcare™, Problem Solved.®, the FlexSim logo, the FlexSim X-mark, and the FlexSim Healthcare logo with stylized Caduceus mark are trademarks of FlexSim Software Products, Inc. All rights reserved.
Privacy | Do not sell or share my personal information | Cookie preferences | Report noncompliance | Terms of use | Legal | © Autodesk Inc. All rights reserved