Kumaresh_07
Automotive
- Jul 21, 2019
- 14
hi all,
I would like to write a code for Getting Full path of Selected component.
It would be nice if you guys could help me.
Now i have code for user component selection. but i don't know how to get that selected component directory.
I would like to write a code for Getting Full path of Selected component.
It would be nice if you guys could help me.
Now i have code for user component selection. but i don't know how to get that selected component directory.
Code:
Option Explicit Off
Option Infer On
Imports NXOpen
Imports System
Imports NXOpen.UF
Module NXJournal
Sub Main()
Dim theSession = NXOpen.Session.GetSession()
Dim workPart As NXOpen.Part = theSession.Parts.Work
Dim displayPart As NXOpen.Part = theSession.Parts.Display
Dim theUI As UI = UI.GetUI
Dim title As String = "Select the component"
Dim includeFeatures As Boolean = False
Dim keepHighlighted As Boolean = False
Dim selAction As Selection.SelectionAction = Selection.SelectionAction.ClearAndEnableSpecific
Dim cursor As Point3d
Dim scope As Selection.SelectionScope = Selection.SelectionScope.AnyInAssembly
Dim selectionMask_array(0) As Selection.MaskTriple
With selectionMask_array(0)
.Type = UFConstants.UF_component_type
.SolidBodySubtype = UFConstants.UF_UI_SEL_FEATURE_BODY
End With
Dim resp As Selection.Response = theUI.SelectionManager.SelectTaggedObject(prompt, _
title, scope, selAction, _
includeFeatures, keepHighlighted, selectionMask_array, _
selobj, cursor)
End Sub
End Module