ExportNodes
Overloads
| Name | Description |
|---|---|
| ExportNodes() | 선택된 노드 내보내기 |
| ExportNodes(string path) | 선택된 노드 내보내기 |
| ExportNodes(string path, List<Node> nodes) | 지정된 노드 내보내기 |
| ExportNodes(string input, string outputDir, List<int> id) | VIZ 파일의 지정된 노드를 내보내기 |
ExportNodes()
public bool ExportNodes()
선택된 노드 내보내기
Returns
| Type | Description |
|---|---|
| bool | 결과 |
ExportNodes(string path)
public bool ExportNodes(string path)
선택된 노드 내보내기
Parameters
| Name | Type | Description |
|---|---|---|
| path | string | 내보내기 경로 |
Returns
| Type | Description |
|---|---|
| bool | 결과 |
ExportNodes(string path, List<Node> nodes)
public bool ExportNodes(string path, List<Node> nodes)
지정된 노드 내보내기
Parameters
| Name | Type | Description |
|---|---|---|
| path | string | 내보내기 경로 |
| nodes | List<Node> | 노드 목록 |
Returns
| Type | Description |
|---|---|
| bool | 결과 |
Examples
// VIZCore3D.NET Control
private VIZCore3D.NET.VIZCore3DControl vizcore3d;
private void Example()
{
if (vizcore3d.Model.IsOpen() == false) return;
List<VIZCore3D.NET.Data.Node> nodes =
vizcore3d.Object3D.FromFilter(VIZCore3D.NET.Data.Object3dFilter.SELECTED_TOP);
if (nodes.Count == 0) return;
vizcore3d.Model.ExportNodes("C:\\Temp", nodes);
MessageBox.Show("Export Completed.", "VIZCore3D.NET", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
ExportNodes(string input, string outputDir, List<int> id)
public void ExportNodes(string input, string outputDir, List<int> id)
VIZ 파일의 지정된 노드를 내보내기
Parameters
| Name | Type | Description |
|---|---|---|
| input | string | 입력 파일 - EX) C:\Model\A.viz |
| outputDir | string | 출력 경로 - EX) C:\Output |
| id | List<int> | 내보내기 대상 노드 아이디 목록 |
Examples
// VIZCore3D.NET Control
private VIZCore3D.NET.VIZCore3DControl vizcore3d;
private void Example()
{
// INPUT
OpenFileDialog dlg = new OpenFileDialog();
dlg.Filter = "VIZ File (*.viz)|*.viz";
if (dlg.ShowDialog() != DialogResult.OK) return;
// OUTPUT DIR.
FolderBrowserDialog output = new FolderBrowserDialog();
output.SelectedPath = System.IO.Path.GetDirectoryName(dlg.FileName);
if (output.ShowDialog() != DialogResult.OK) return;
List<int> id = new List<int>();
// Load Structure
VIZCore3D.NET.ShdCore.StructureManager stru =
new VIZCore3D.NET.ShdCore.StructureManager(dlg.FileName);
// All Node
List<VIZCore3D.NET.ShdCore.ModelTreeNode> nodes = stru.GetStructureNodeList();
// Find Node
foreach (VIZCore3D.NET.ShdCore.ModelTreeNode node in nodes)
{
if (node.NodeName.Contains("PIPE") == false) continue;
id.Add(Convert.ToInt32(node.EntityId));
}
if (id.Count == 0) return;
// Export
vizcore3d.Model.ExportNodes(
dlg.FileName /* INPUT (VIZ) */
, output.SelectedPath /* OUTPUT DIR. */
, id /* NODE ID */
);
}