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

Notification

Icon
Error

Options
Go to last post Go to first unread
NeilN  
#1 Posted : Saturday, March 29, 2008 5:39:43 AM(UTC)
NeilN

Rank: Newbie

Groups: Guest
Joined: 2/12/2008(UTC)
Posts: 5

Hello,

After using a create designer such as ClosedPolyLineVObjectCreateDesigner or LineVObjectCreate desginer, I am attempting to keep a reference to the newly created Vector Object.

this is what I am trying now, but the "old designer" doesnt contain a VObect... where did it go?

Code:
if (e.OldDesigner.GetType() ==
    typeof(ClosedPolyLineVObjectCreateDesigner))
{
    regionList.SelectedNode.OutlineVObject =
        (PolylineVObject)e.OldDesigner.VObjects[0];
}

However I get an index out of range error, there are no obects in e.OldDesigner.VObjects, where did my newly created VObject go?

Edited by user Sunday, March 30, 2008 4:24:07 PM(UTC)  | Reason: Not specified

Alex Kon  
#2 Posted : Sunday, March 30, 2008 4:19:25 PM(UTC)
Alex Kon

Rank: Advanced Member

Groups: Guest
Joined: 1/31/2005(UTC)
Posts: 458

Was thanked: 5 time(s) in 5 post(s)
Hello,

I recommend you to handle MultiLayerViewer.LayerChanged event and track type of the changes. Something like that:

Code:
void _mlv_LayerChanged(object sender,
    Aurigma.GraphicsMill.WinControls.LayerChangedEventArgs e)
{
    if (e.ChangeType ==
        Aurigma.GraphicsMill.WinControls.LayerChangeType.ObjectAdded)
    {
        Aurigma.GraphicsMill.WinControls.PolylineVObject pl =
           e.VObject as Aurigma.GraphicsMill.WinControls.PolylineVObject;
        if (pl != null)
        {
            //do something with all newly added polylines
        }				
    }
}

Edited by user Sunday, March 30, 2008 4:22:39 PM(UTC)  | Reason: Not specified

Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.