Click or drag to resize
XDL

NXMapLayerVectorEditorCreateNewOBJ Method (eXvcObjType, ArrayList)

객체 형식과 정점 배열을 이용하여 새로운 객체를 생성한다.

Namespace:  Pixoneer.NXDL.NXMap
Assembly:  NXMap (in NXMap.dll) Version: 1.2.817.72
Syntax
C#
public XvcObj CreateNewOBJ(
	eXvcObjType type,
	ArrayList vertexList
)

Parameters

type
Type: Pixoneer.NXDL.NVCeXvcObjType
[In] 객체 형식
vertexList
Type: System.CollectionsArrayList
[In] 정점 목록

Return Value

Type: XvcObj
객체가 생성되면 XvcObj 객체를 반환하고, 그렇지 않으면 null을 반환하다.
Examples
예제 #1:
private void pointToolStripMenuItem_Click(object sender, EventArgs e)
{
    XvcObj obj = nxMapLayerVectorEditor1.CreateNewOBJ(Pixoneer.NXDL.NVC.eXvcObjType.POINT, null);
}

private void lineToolStripMenuItem_Click(object sender, EventArgs e)
{
    XvcObj obj = nxMapLayerVectorEditor1.CreateNewOBJ(Pixoneer.NXDL.NVC.eXvcObjType.LINE, null);
}

private void ellipseToolStripMenuItem_Click(object sender, EventArgs e)
{
    XvcObj obj = nxMapLayerVectorEditor1.CreateNewOBJ(Pixoneer.NXDL.NVC.eXvcObjType.ELLIPSE, null);
}

private void rectangleToolStripMenuItem_Click(object sender, EventArgs e)
{
    XvcObj obj = nxMapLayerVectorEditor1.CreateNewOBJ(Pixoneer.NXDL.NVC.eXvcObjType.RECTANGLE, null);
}

private void polylineToolStripMenuItem_Click(object sender, EventArgs e)
{
    XvcObj obj = nxMapLayerVectorEditor1.CreateNewOBJ(Pixoneer.NXDL.NVC.eXvcObjType.POLYLINE, null);
}

private void textToolStripMenuItem_Click(object sender, EventArgs e)
{
    XvcObj obj = nxMapLayerVectorEditor1.CreateNewOBJ(Pixoneer.NXDL.NVC.eXvcObjType.TEXT, null);
}

private void polygonToolStripMenuItem_Click(object sender, EventArgs e)
{
    XvcObj obj = nxMapLayerVectorEditor1.CreateNewOBJ(Pixoneer.NXDL.NVC.eXvcObjType.POLYGON, null);
}

private void textBoxToolStripMenuItem_Click(object sender, EventArgs e)
{
    XvcObj obj = nxMapLayerVectorEditor1.CreateNewOBJ(Pixoneer.NXDL.NVC.eXvcObjType.TEXTBOX, null);
}

private void measurePointToolStripMenuItem_Click(object sender, EventArgs e)
{
    XvcObj obj = nxMapLayerVectorEditor1.CreateNewOBJ(Pixoneer.NXDL.NVC.eXvcObjType.MEASURE_POINT, null);
}

private void measureDistanceToolStripMenuItem_Click(object sender, EventArgs e)
{
    XvcObj obj = nxMapLayerVectorEditor1.CreateNewOBJ(Pixoneer.NXDL.NVC.eXvcObjType.MEASURE_DIST, null);
}

private void measureAreaToolStripMenuItem_Click(object sender, EventArgs e)
{
    XvcObj obj = nxMapLayerVectorEditor1.CreateNewOBJ(Pixoneer.NXDL.NVC.eXvcObjType.MEASURE_AREA, null);
}

private void measureAngleToolStripMenuItem_Click(object sender, EventArgs e)
{
    XvcObj obj = nxMapLayerVectorEditor1.CreateNewOBJ(Pixoneer.NXDL.NVC.eXvcObjType.MEASURE_ANGLE, null);
}

private void bitmapToolStripMenuItem_Click(object sender, EventArgs e)
{
    XvcObj obj = nxMapLayerVectorEditor1.CreateNewOBJ(Pixoneer.NXDL.NVC.eXvcObjType.BITMAP, null);
    if (obj != null)
    {
        string strError = string.Empty;
        string strFilePath = Xfn.GetResourcePath() + "\\indexmap.bmp";
        ((XvcBitmap)obj).BitmapName = "INDEX_MAP";
        ((XvcBitmap)obj).SetImage(strFilePath, ref strError);
    }
}        ///
예제 #2:
private void rectangleToolStripMenuItem_Click(object sender, EventArgs e)
{
    System.Collections.ArrayList vertexList = new System.Collections.ArrayList();
    vertexList.Add(new XVertex3d(10, 10, 0));
    vertexList.Add(new XVertex3d(30, 30, 0));

    XvcObj obj = nxMapLayerVectorEditor.CreateNewOBJ(eXvcObjType.Rectangle, vertexList);
    obj.IsFixed = true;
    nxMapLayerVectorEditor.SelectNone();
}        ///
See Also