Macros and Graphics in C#
Hi All!
I am working with VSTA programming a macro that makes an object disappear by becoming more and more transparent, and then a new object appears becoming less transparent in the same place
I have a problem because I have to repeat this procedure in different phases with different objects, and it is getting complicated.
I am using TemporaryGraphics because it is the only way I found to draw and object with transparency, but they have lots of limitations, for example I cannot remove only one, so I cannot make it disappear...
Is there a better way to do this? Can I add transparency to one part?
Thank you very much in advance for your ideas and help!
Best regards,
Anna
Anna
Comments
-
Hi Anna!
Have you tried to remove a temporary graphics objects like this?
Station s; Part p;
TemporaryGraphic tempGfx = s.TemporaryGraphics.DrawPart(Matrix4.Identity, p);
s.TemporaryGraphics.Remove(tempGfx);
Best Regards
Niklas Skoglund
0 -
Hi Niklas!
Thank you very much for your help, I think I can see the problem now, but I don't know how to solve it yet!
I was working with GraphicComponents because I cannot create/declare a TemporaryGraphic as you do in your example, it is not a reserved word (it does not appear in the list and it does not turn blue) maybe I have to use another reference?
Anna
Best Regards,
Anna0 -
Ok I've got it!
I had to add:
using ABB.Robotics.RobotStudio.Stations.Forms;I used the object browser to see where the TemporaryGraphics were, I'd had never thought that I was missing something, because I was using already the TemporaryGraphics...
Thanks again Niklas!
Best regards,
Anna
Best Regards,
Anna0
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 249 ScreenMaker
- 2.7K Robot Controller
- 310 IRC5
- 59 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 786 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings