표면노트
표면노트 API 예제
- 표면노트는 뷰어상의 고정된 위치에 노트를 생성하며,
모델과 노트 텍스트 사이가 지시선으로 연결된 형태입니다.
ℹ️ 참고
- 2D 노트는 뷰어 화면 기준으로 생성됩니다.
- 3D 노트는 뷰어 공간상에 생성되며, 모델 지시선이 없습니다.
표면노트 생성 예제
// 모델 열린 상태 확인
if (Connector.IsOpenDocument() == false) return;
// 전체 노드 정보 조회
List<NodeVO> items = Connector.GetAllObjects();
// 화면 렌더링 차단
Connector.EnableRender(false);
// 기본 리뷰 옵션 설정
ReviewOptionVO option = Connector.GetReviewOption();
option.ArrowColor = Color.Red;
Connector.SetReviewOption(option);
foreach (NodeVO item in items)
{
// 최하위 노드 제외
if (item.NodeType == NodeType.PART) continue;
// 자식 노드가 없는 노드 제외
if (item.ChildCount == 0) continue;
// 최하위 노드의 바로 상위 노드가 아닌 경우 제외
List<NodeVO> children = Connector.GetChildObjects(item.Index, ChildrenTypes.Children);
if (children[0].NodeType != NodeType.PART) continue;
// 표면점 검색
float[] surfacePoint = Connector.GetPointOnModelNearByCOG(
new int[] { item.Index }
);
// 노트 생성
int surfaceNoteId = Connector.AddSurfaceNoteCustom(
string.Format("NAME {0}", item.Index),
surfacePoint[0], /* Position X */
surfacePoint[1], /* Position Y */
surfacePoint[2], /* Position Z */
surfacePoint[0], /* Text X */
surfacePoint[1] - 1000, /* Text Y */
surfacePoint[2] + 1000 /* Text Z */
);
// 노트 스타일 설정
Connector.SetReviewItemExtStyle(
surfaceNoteId,
false,
string.Empty,
FontSize.Size_14,
0.0f,
Color.Black,
Color.White,
true,
false
);
}
// 화면 렌더링 차단 해제
Connector.EnableRender(true);
Figure 1 : 표면노트 추가 결과

ℹ️ 성능 참고
Connector.EnableRender(false)호출 시 3D 화면을 다시 그리지 않습니다.
모든 노트 추가가 끝난 후EnableRender(true)를 호출하면
변경 사항이 한 번에 반영되어 성능이 향상됩니다.
ℹ️ 리뷰 옵션 참고
GetReviewOption()은 VIZZARD에 설정된 기본 리뷰 스타일을 조회하며,
해당 정보를 기반으로SetReviewItemExtStyle()에 적용할 수 있습니다.
심볼 옵션 적용 예제
// 노트 스타일 설정
Connector.SetReviewItemExtStyle(
surfaceNoteId,
true, /* 심볼 활성화 */
item.Index.ToString(), /* 심볼 텍스트 */
FontSize.Size_14,
15.0f, /* 심볼 크기(반지름) */
Color.Black,
Color.White,
true,
false
);
Figure 2 : 표면노트 심볼 옵션 활성화

노트 텍스트 색상 강조 예제
foreach (NodeVO item in items)
{
if (item.NodeType == NodeType.PART) continue;
if (item.ChildCount == 0) continue;
List<NodeVO> children = Connector.GetChildObjects(item.Index, ChildrenTypes.Children);
if (children[0].NodeType != NodeType.PART) continue;
float[] surfacePoint = Connector.GetPointOnModelNearByCOG(
new int[] { item.Index }
);
string noteText = "<fa style=\"color:rgb(45,31,255)\">WORK ITEM #1</fa>\r\n";
noteText += "<fa style=\"color:rgb(255,0,0)\">WORK ITEM #2</fa>\r\n\r\n";
noteText += "<fa style=\"color:rgb(45,100,255)\">번호</fa> : 1\r\n";
noteText += "<fa style=\"color:rgb(100,31,255)\">부재명</fa> : DA-001\r\n";
noteText += "<fa style=\"color:rgb(45,31,100)\">착수일</fa> : 2019-04-11\r\n";
noteText += "<fa style=\"color:rgb(90,90,255)\">완료일</fa> : 2019-04-12\r\n";
int surfaceNoteId = Connector.AddSurfaceNoteCustom(
noteText,
surfacePoint[0],
surfacePoint[1],
surfacePoint[2],
surfacePoint[0],
surfacePoint[1] - 1000,
surfacePoint[2] + 1000
);
Connector.SetReviewItemExtStyle(
surfaceNoteId,
true,
item.Index.ToString(),
FontSize.Size_14,
15.0f,
Color.Black,
Color.White,
true,
false
);
}
Figure 3 : 표면노트 텍스트 색상 강조

표면노트 삭제
// 개별 노트 삭제 (Note ID 기준)
Connector.DeleteReviewItem(surfaceNoteId);
// 유형별 전체 삭제 - Surface Note
Connector.DeleteReviewItemCustom(Review_Kind.RK_SURFACE_NOTE);