Click or drag to resize
XDL

NObjectManagerLoadDefaultDrawInfo(String) Method

고정 경로에 있는 config 파일(.xml)을 로드해서 Canvas 뷰의 주기 기본 속성값으로 설정한다.

Namespace: Pixoneer.NXDL.NXAnnotation
Assembly: NXAnnotation (in NXAnnotation.dll) Version: 2.0.3.38 (2.0.3.38)
Syntax
C#
public bool LoadDefaultDrawInfo(
	ref string strError
)

Parameters

strError  String
에러 메세지

Return Value

Boolean
성공이면 true, 실패이면 false를 반환한다.
Example
주기 기본 속성값을 config 파일로 저장하고 로드하는 예제:
C#
public MainWindow()
{
    InitializeComponent();

    // 주기 속성 초기화
    vectorEditor.ObjectManager.LineColor = Colors.Yellow ;
    vectorEditor.ObjectManager.ForeColor = Colors.Red;
    vectorEditor.ObjectManager.BackColor = Colors.White;
    vectorEditor.ObjectManager.TextColor = Colors.Blue;

    vectorEditor.ObjectManager.LineStyle = eLineStyle.Solid;
    vectorEditor.ObjectManager.FillStyle = eFillStyle.Solid;

    vectorEditor.ObjectManager.IsDrawBorder = true;
    vectorEditor.ObjectManager.IsDrawFill = false;

    vectorEditor.ObjectManager.LineThick = 1;


    vectorEditor.ObjectManager.DefaultFontSize = 10;
    vectorEditor.ObjectManager.DefaultFontFamily = new FontFamily("굴림");

    vectorEditor.ObjectManager.IsBold = false;
    vectorEditor.ObjectManager.IsItalic = false;
    vectorEditor.ObjectManager.IsUnderline = false;
    vectorEditor.ObjectManager.IsStrikethrough = false;

    vectorEditor.ObjectManager.HorizontalAlignment = TextAlignment.Center;
    vectorEditor.ObjectManager.VerticalAlignment = eTextVerticalAlignment.Center;

    vectorEditor.ObjectManager.UseSizeUnit = true;
    vectorEditor.ObjectManager.TextSizeUnit = 3;   // meter or pixel
    vectorEditor.ObjectManager.ThickUnit = 1;       // meter or pixel
    vectorEditor.ObjectManager.PointSizeUnit = 3;       // meter or pixel

    vectorEditor.ObjectManager.IndexMapColor = Colors.Red;

    vectorEditor.ObjectManager.PointType = ePointType.Circle;
    vectorEditor.ObjectManager.PointSize = 1;

    string strError = "";
    vectorEditor.ObjectManager.SaveDefaultDrawInfo(ref strError);
    vectorEditor.ObjectManager.LoadDefaultDrawInfo(ref strError);
}
See Also