Is there a way to copy a 3D graphic group(s) from one object to another via simtalk?
If the answer is no, my issue is I would like to show a set number or text above a MU in 3D representation; is there a workaround if the copy method doesn't exist?
Thank you for your support.
Solved! Go to Solution.
The idea with _3D.createText is good - however, I would prepare an animatable object for that in advance.
That way, you only switch off the graphic inheritance of that animatable object and not that of the whole MU. Especially if the graphics of the MU is rather complex, this is interesting.
Say, you have the animatable object "Tag" in your MU class and <mu> is your MU instance. Then you could write your tag about like this:
I've tried the createText(...) and it's quite the solution, but the problem is that the textbox below the text is visible as a coloured rectangle. Is it somehow possible to set the background of the text transparent, not visible?
Furthermore, is there in general a way to copy a 3D graphic group from an object to another?
you can "set" a material to the text graphics ( select object and press ctrl 3 for properties )
Then you can set the object transparency- but this has also impact on the black text characters.
To copy a graphics group, select the group and copy & paste it.
Thanks, but as you said, also the text itself is affected by transparency and it's not good.
Instead, about copying the graphics, I'd need a way using simtalk code to copy and paste groups, during simulation runs. I've tried saving the graphic in an external file and then importing it during the simulation (always via simtalk), but the program crashes, therefore it's not a viable solution.
do you have the error message of your crash?
Because I have to dinamically change the appearence of an object (MU in this case) during the simulation; and I don't want this object to have all the possible configuration of apperance to be already on it (show/hide method), otherwise the object would be to big and heavy both in performance and occupied space.
Thus, I would like to copy graphics from a standard object only when and where I need.