본문으로 건너뛰기

GetNodes

Overloads​

NameDescription
GetNodes(string key, string val, List<Node> nodes, bool valueFullMatch, string category)지정된 노드에서 특정 UDA 정보가 포함(미포함)되는 노드 반환
GetNodes(ObjectAttributeCollection conditions, bool joinCondition, bool valueFullMatch)복수 조건에 해당하는 노드 목록 반환

GetNodes(string key, string val, List<Node> nodes, bool valueFullMatch, string category)​

public List<Node> GetNodes(string key, string val, List<Node> nodes, bool valueFullMatch, string category)

지정된 노드에서 특정 UDA 정보가 포함(미포함)되는 노드 반환

Parameters​

NameTypeDescription
keystring속성 KEY
valstring속성 VALUE
nodesList<Node>노드 목록
valueFullMatchbool속성 VALUE FullMatch
categorystring카테고리 명(default : GENERAL)

Returns​

TypeDescription
List<Node>속성이 포함(미포함)된 노드 목록

Examples​

// VIZCore3DX.NET Control
private VIZCore3DX.NET.VIZCore3DXControl vizcore3dx;

private void Example()
{
if (vizcore3dx.Model.IsOpen() == false) return;

// 대분류 - TYPE : PIPE
List<VIZCore3DX.NET.Data.Node> pipe =
vizcore3dx.Object3D.UDA.GetNodes(
"TYPE" /* KEY */
, "PIPE" /* VALUE */
);

// 상세분류 - SERVICE : BILGE & GENERAL SERVICE LINE
List<VIZCore3DX.NET.Data.Node> service =
vizcore3dx.Object3D.UDA.GetNodes(
"SERVICE" /* KEY */
, "BILGE & GENERAL SERVICE LINE" /* VALUE */
, pipe /* 검색 대상 노드 */
, true /* 포함(미포함) */
);
}

GetNodes(ObjectAttributeCollection conditions, bool joinCondition, bool valueFullMatch)​

public List<Node> GetNodes(ObjectAttributeCollection conditions, bool joinCondition, bool valueFullMatch)

복수 조건에 해당하는 노드 목록 반환

Parameters​

NameTypeDescription
conditionsObjectAttributeCollection속성 조건 목록
joinConditionbool조건 간 논리 연산자 - true: AND / false: OR
valueFullMatchbool속성 Value 완전 일치 여부 - true: 완전 일치 / false: 포함 검색

Returns​

TypeDescription
List<Node>조건에 해당하는 노드 목록

Examples​

// VIZCore3DX.NET Control
private VIZCore3DX.NET.VIZCore3DXControl vizcore3dx;

private void Example()
{
if (vizcore3dx.Model.IsOpen() == false) return;

// 복수 조건 구성
ObjectAttributeCollection conditions = new ObjectAttributeCollection();
conditions.Add(new ObjectAttribute { Category = "General", Key = "TYPE", Val = "PIPE" });
conditions.Add(new ObjectAttribute { Category = "General", Key = "SYSTEM", Val = "GENERAL SERVICE LINE" });

// AND 조건 조회
List<Data.Node> andResult = vizcore3dx.Object3D.UDA.GetNodes(conditions, joinCondition: true, valueFullMatch: true);

// OR 조건 조회
List<Data.Node> orResult = vizcore3dx.Object3D.UDA.GetNodes(conditions, joinCondition: false, valueFullMatch: true);

MessageBox.Show(
string.Format("AND 결과 : {0}개\nOR 결과 : {1}개", andResult.Count, orResult.Count),
"TEST"
);
}