This forum contains outdated content and is available for reading only. Please contact technical support if you have any questions.

Group VObject

Hi,

Is that possible to group VObject? What we trying to do is create our own VObject which can draw "callouts". Where it will be joining polygon drawing and also text.

Please advise..

Thanks.
Hello Ching-Yen,

It is possible. You can found detailed information on how to use it in the CompositeVObject Class article.
Hi,

Thanks for the link. But, is there any sample on this? It's really difficult to understand how to make use of those by just reading the function list. Please advise..
Hello Ching-Yen,

I created simple win application. It allows creating two vector objects and grouping them to one. I attached this sample for your reference. Please download and try it out. If you have any questions or problems, I will be glad to assist you.
Hi,

We tried to modify the given sample. But, we are facing problem when user try to click on the created group object, it will give error. Please find attach for the sample code.

p/s: Click on the button 2 and drag to draw it.
Hello Ching-Yen,

This error occurs because all vector objects should be added on the multilayer viewer. Please correct your script so that all your objects will be added on viewer like in my first sample:

multiLayerViewer1.Layers[0].VObjects.Add(rectangle);
multiLayerViewer1.Layers[0].VObjects.Add(text);