×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

DeviationGauge tool - NX Open

DeviationGauge tool - NX Open

DeviationGauge tool - NX Open

(OP)
Hi, i am trying to call/use the deviation gauge analysis tool in NX Open to measure the distance between a set of surfaces and a set of facets (STL) imported in Siemens NX.

Is there a way to have access to have access to a numerical value describing the distances between the couples of points considered by the tool? In other words: whenever i use the DeviationGauge directly from Siemens NX i see the distance values visualized on the screen. Using it in OpenNX, i need something like it. This is for me the analysis result, and it's what i need to use in my code.

RE: DeviationGauge tool - NX Open

(OP)
Just to clarify what could be misinterpretated: what i need is a way to access the values in FIG, directly from the NXOPEN code.
The most ideal condition would be to have access to all the values of the STL points, but MAX and MIN values could do.



RE: DeviationGauge tool - NX Open

(OP)
Anyone?

RE: DeviationGauge tool - NX Open

There is Snap.Compute.DeviationInfo, but not sure if it works on facetted bodies.

Or, you could cycle through the vertices of the facetted body and measure distance from each one to your surface.

Or, sometimes you can persuade an NX measurement function to send its output to a text file, instead of the listing window. Then your code has to hunt through the text file to get the info you need.

RE: DeviationGauge tool - NX Open

(OP)
Thanks BubbaK for your answer!

I tried Snap.compute.DeviationInfo, but in my experience it does not work on facetted bodies.

The second option is the solution that i am trying to pospone as my final possibility.

The third thing is actually what i am trying to do. That would be perfect, but i think that my lack of knowledge in programming and VBA is what is slowing me. I cannot find the output of the measurement function anywhere, i don't know where it is stored. It seems impossible that it is only visualized in the software environment but not accessible in code, isn't it?


Thanks again, i am really stuck with this problem!

RE: DeviationGauge tool - NX Open

To get output to a file, it sometimes works to do

NXOpen.ListingWindow.ListingWindow.SelectDevice(NXOpen.ListingWindow.DeviceType.File, filePathString)

RE: DeviationGauge tool - NX Open

(OP)
Sorry once again for my trivial questions.
maybe i need to clarify my problem:

I do have a couple of ideas to get a file output with OPEN, but i can not locate where the data that i need is stored (the results of DeviationGauge, correctly visualized in the NX environment, see figure)!



RE: DeviationGauge tool - NX Open

When you make this call

NXOpen.ListingWindow.ListingWindow.SelectDevice(NXOpen.ListingWindow.DeviceType.File, filePathString)

you are *telling* NX where to put the results. That's what the filePathString argument is -- it's the pathname of the file where you want the output to be written (instead of being written to the listing window).

RE: DeviationGauge tool - NX Open

(OP)
Thank you again.

I used your suggestion, but the file comes out empty. Is this possible? Am i doing something wrong? (highly possible ;) )

RE: DeviationGauge tool - NX Open

(OP)
This is what i wrote:

CODE --> VB.net

Dim lw1 As ListingWindow
        lw1 = theSession.ListingWindow
Dim myDocs As String
        myDocs = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)
Dim outputFile2 As String = IO.Path.Combine(myDocs, "testlog.txt")
        
lw1.Open()
        lw1.SelectDevice(ListingWindow.DeviceType.FileAndWindow, outputFile2)
        lw1.Close() 


This is what i get:

============================================================
Information listing created by : Francesco
Date : 03/03/2016 12:51:00
Current work part : C:\Users\Freng\Desktop\NX\flangia_finale2.prt
Node name : desktop-a5qleao
============================================================
Filename: C:\Users\Freng\Desktop\NX\flangia_errore_segmentata\flangia_errore_segmentata_2.stl

Number of topologies 1

Topology 0 contains 22264 facets

Total number of facets used 22264
Total degenerate facets 0

RE: DeviationGauge tool - NX Open

(OP)
maybe the distances that i am able to see in the NX environment (associated with the analysis?) can not be reported in the listing window?

RE: DeviationGauge tool - NX Open

(OP)


This is the data that i need, but i can only see/read it in the 3D view of the software. Every evaluated distance is reported on the corresponding point of the STL.

RE: DeviationGauge tool - NX Open

(OP)
The distances are not actually listed in the listing/information window. The step that i miss to be able to print the data is exactly that. In the "deviation gauge" window there is no option to send the data to the information window (as in the "measure minimum distance" tool, for example), and i don't know how to do it.

RE: DeviationGauge tool - NX Open

In interactive mode ( i.e not running code to do this) , If i leave ( OK) the deviation gauge, it will still be displayed on screen. Then select the deviation gauge and do a Information - Object ( Ctrl+ I) NX will produce the report you are looking for.

Regards,
Tomas

RE: DeviationGauge tool - NX Open

(OP)
Hi Toost, thanks for your answer, it's very helpful and i will try it as soon as possible.

Is there a way to do it from code also?

Thanks again

RE: DeviationGauge tool - NX Open

(OP)
It works!!!! Thanks! Now i'll try to call it using OPEN.

RE: DeviationGauge tool - NX Open

(OP)
I managed to call it from OPEN using the journal. Thank you again!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources