cancel
Showing results for 
Search instead for 
Did you mean: 

Get result from Calculate Area function

Experimenter
Experimenter

Hi there,

 

I'm programming something to give me the projected area of a body. I have made a journal to calculate it through the 'Calculate Area' function in the Mold application. When I run my program, everything works and I'm getting a notepad window with the results. Now my question: how can I get the resulting area value into a variable? By debugging, I'm not seeing where I can obtain the resultvalue. Can anybody help me please?

 

Thanks,

Alexander

3 REPLIES

Re: Get result from Calculate Area function

Phenom
Phenom

Are you asking if you can get the output of the  'Calculate Area' function to a/your variable? How are your "printing" to the LW?

Production: NX9.0.3.4, NX10.0.2.6
Development: VB.NET (amateur level !)

Re: Get result from Calculate Area function

Experimenter
Experimenter

Hi Alexander,

 

you can save the content of the listingwindow to a file using

  ufs.Ui.SaveListingWindow(fspec)

 

where fspec represents the complete filename.

Afterwards you can read the textfile and find the projected area value

 

Best regards

Frank De Mets

Re: Get result from Calculate Area function

Experimenter
Experimenter

This works well. Thank you, Frank De Mets!

 

With regards,

Alexander Priem