cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing data produced by 'SolidPropertyCheckBuilder'?

Phenom
Phenom

To all,

 

I am looking at a possibility of writing a small piece of code to get the Solid Properties of a FEM using a group-based approach. The current idea is to returm a "table" of data the way I want it;

group1,Mass,cofg,XcofgY,cofgZ,inertiaX,inertiaY,inertiaZ

group2,Mass,cofg,XcofgY,cofgZ,inertiaX,inertiaY,inertiaZ

group3,Mass,cofg,XcofgY,cofgZ,inertiaX,inertiaY,inertiaZ

etc...

 

Looking the at the doc it seems that the API 'SolidPropertyCheckBuilder' is the one to use but I cannot find how to access the data produced. ie the data "printed" to the info window

 

I hope that once the output is accessed (a string() ?) I can parse it to access the data I want/need

 

Any ideas?

 

Thanks

Regards

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

Re: Accessing data produced by 'SolidPropertyCheckBuilder'?

Solution Partner Genius Solution Partner Genius
Solution Partner Genius

Before calling the SolidPropertyCheckBuilder, change the Listing windows device to text file. So all the output will be written in a text file that you can parse later.  Check the ListingWindows Documentation:

 

 

void NXOpen::ListingWindow:Smiley FrustratedelectDevice(NXOpen::ListingWindow:Smiley Very HappyeviceType deviceType,
  const NXStringfileName 
 )  

Changes where the listing window output is sent.

The listing window output can be sent to the Information window of the Unigraphics session, to a file, or to both.

Note: file output is buffered. If file output is used, the buffer will not be flushed until the output device is changed again. E.g.

 

ListingWindow.SelectDevice(File, "log.txt")
ListingWindow.Open()
ListingWindow.WriteLine("output")
ListingWindow.Close()
' buffer is not flushed yet
ListingWindow.SelectDevice(Window, "")
' now the buffer is flushed

 

 

Re: Accessing data produced by 'SolidPropertyCheckBuilder'?

Phenom
Phenom

Thanks for that

So when I "execute" the SolidPropertyCheckBuilder the data will be automatically written to whatever file I specify? And then I just need to parse the file for the info I need

 

Thanks

Regards

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

Re: Accessing data produced by 'SolidPropertyCheckBuilder'?

Solution Partner Genius Solution Partner Genius
Solution Partner Genius

Yes.