Submitted by MARTYNW on Tue, 10/26/2021 - 07:25
Forums:
I need to add temporary indicators on a part that change as I change values in a dialogue - ideally a number of small cones pointing to the model. These will then be removed when the dialogue has finished.
What technique should I investigate for temporary placemat these 3d pointers in a model?
re: temporary indicator
The .LabeledConehead method might be useful in your case. It will create a temporary arrow in the graphics window.
.net interface
Hi thanks, Unfortunately I am struggling to find examples and workout how to use it.
I am a bit green to this!
NX.UF.UFDisp.LabeledConehead() does not work as it does not seem to be a static method?
re: temporary indicator
The labeled conehead is a UF function, as such it needs a reference to the UF session. A quick example is below; it will create a temporary (will persist in the graphics window until the display is updated) arrow with text.
Imports NXOpen
Imports NXOpen.UF
Imports System
Module Module174
Dim theSession As Session = Session.GetSession()
Dim theUfSession As UFSession = UFSession.GetUFSession
Dim lw As ListingWindow = theSession.ListingWindow
Sub Main()
lw.Open()
Dim point1() As Double = {1, 0, 0}
Dim vector1() As Double = {-1, 0, 0}
theUfSession.Disp.LabeledConehead(UFConstants.UF_DISP_ALL_ACTIVE_VIEWS, point1, vector1, 1, "label1")
End Sub
End Module
reply
Thanks that worked. How do I move them or delete them and redraw them ?
re: temporary indicator
They will be removed when the display is refreshed. The user can refresh the display (F5), or you can do it in code.
theSession.Parts.Work.Views.Refresh()
Thanks for your help here.
Thanks for your help here. The labeled conehead gives me what I looking for.
Unfortunately the arrows point the wrong way around and stay the same size when zooming in and out. When I have a small feature and zoom out I get a pile of arrows. Are there settings that control this. If not is there another way?