PDA

View Full Version : API speed



robert.ronnholm
2009-12-17, 06:14 AM
This single line of code in my Visual C# program takes 0.31 sec!

bar.SetLabel(IRobotLabelType.I_LT_MEMBER_TYPE, "diagonal");

This is quite a problem for me. Is the API really that slow?

marek.wiecek
2009-12-18, 08:28 AM
Switch Interactive flag off before you start model generation.

RobApp.Interactive = false;

Remember to restore Interactive flag after you finish.

For generating bar models from scratch you can use RobotStructureCache object.

robert.ronnholm
2009-12-18, 01:04 PM
The interactive flag had little or no effect, but that led me to another setting: Disabling OpenGL took 70% off my modeling time.

I haven't tried caching the model yet but I suspect that will make my modeling reasonably fast...

Thanks Marek