Product : Engine, Version : 5.1.1.1037, ArticleID : 41024020

HowTo : How Selecting objects in deferent elevations using the Select "F" fence method of a SelectionSet in C++

Article41024020
TypeHowTo
ProductEngine
Version5.1.1.1037
Date Added6/22/2005
Submitted byEric Che
Keywords

Subject

How Selecting objects in deferent elevations using the Select "F" fence method of a SelectionSet in C++

Summary

How Selecting objects in deferent elevations using the Select "F" fence method of a SelectionSet in C++

Solution


void CVdView::OnTest()
{
 CvdSelection set = m_Vdraw.GetActiveDocument().GetSelections().Add(_T("test1"));
 m_Vdraw.Prompt(_T("First point:"));
 COleVariant p1 = m_Vdraw.GetUtility().GetPoint();
 m_Vdraw.Prompt(_T("Second Point"));
 COleVariant p2 = m_Vdraw.GetUtility().GetLine(p1);
 long i = 0;
 COleSafeArray points;
 points.CreateOneDim(VT_VARIANT,2);
 i = 0;
 points.PutElement(&i,&p1);
 i = 1;
 points.PutElement(&i,&p2);
 set.Select(COleVariant(_T("F")),points,COleVariant(_T("NOELEV")));
 set.SetHighLight(1);
 set.Invalidate();

 

}