Cancel
Showing results for 
Search instead for 
Did you mean: 

Trouble reading EDGE names

Solution Partner Pioneer Solution Partner Pioneer
Solution Partner Pioneer

I am having trouble accessing names for edges and vertices imported from x_t.

I can access names for faces via either of the following calls:
- doSrc.Name
- sessUF.Attr.GetStringUserAttribute(X.Tag, "SDL/TYSA_NAME", 0, out strSrcName, out bPresent);

For edges and vertices, the same calls do not work.  My immediate interest is edges


I am checked that the data is present in the x_t file.

 

I also tried: GetStringUserAttribute "SDL/TYSA_UNAME", that found nothing for faces, edges, and vertices
..and that data is present too.

 

An example file is attached

10 REPLIES

Re: Trouble reading EDGE names

Honored Contributor
Honored Contributor

What makes you so sure that the data is present in the parasolid file?

 

"SDL/TYSA_NAME" does not seem to be in the file and "SDL/TYSA_UNAME" appears exactly once. If each edge and face has an attribute with that name, shouldn't it appear once for each face/edge?

Re: Trouble reading EDGE names

Solution Partner Pioneer Solution Partner Pioneer
Solution Partner Pioneer

SDL/TYSA_UNAME very likely only occurs once as a string when it defines the attribute-definition.

 

It is interesting that you found SDL/TYSA_UNAME and not SDL/TYSA_NAME.  I exepected that SDL/TYSA_UNAME would be present rather than SDL/TYSA_NAME.  That has me going back to see if I didn't get the names reversed somewhere. 

 

The name reversal would not lead to a solutions though.

Re: Trouble reading EDGE names

Solution Partner Pioneer Solution Partner Pioneer
Solution Partner Pioneer

To answer your question more directly: I have an application that directly reads the parasolid file.

Re: Trouble reading EDGE names

Solution Partner Pioneer Solution Partner Pioneer
Solution Partner Pioneer

When I open the file in a text editor I found SDL/TYSA_NAME and not SDL/TYSA_UNAME, so we're seeing opposite conditions in the same file.  Is it possible you got it backwards?

 

Re: Trouble reading EDGE names

Honored Contributor
Honored Contributor

I opened the file that you posted in a text editor (notepad++) and "SDL/TYSA_UNAME" appears once in the file (on line 109). "SDL/TYSA_NAME" does not appear in the text.

Re: Trouble reading EDGE names

Solution Partner Pioneer Solution Partner Pioneer
Solution Partner Pioneer

Now I see:

At line 109 there is SDL/TYSA_UNAME

At line 190 there is SDL/TYSA_NAME wrapping around to line 191

 

So with the attribute name issue resolved does anyone know why the attribute is visible for the faces but not for the edges and vertices

 

Re: Trouble reading EDGE names

Esteemed Contributor
Esteemed Contributor

Are there attributes present in the originating NX part of this parasolid file?

If there are no attributes in the NX part, there will be none in the parasolid file too.

Stefan Pendl, Systemmanager CAx, HAIDLMAIR GmbH
Production: NX10.0.3, VERICUT 8.0, FBM, MRL 3.1.4 | TcUA 10.1 MP7 Patch 0 (10.1.7.0) | TcVis 10.1
Development: VB.NET, Tcl/Tk    Testing: NX12.0

How to Get the Most from Your Signature in the Community

Re: Trouble reading EDGE names

Solution Partner Pioneer Solution Partner Pioneer
Solution Partner Pioneer

In my particular usage, the part does not come from NX, but I tried the case you described with the following results. 

 

I set Name, SDL/TYSA_NAME, and SDL/TYSA_NAME from NXOpen using the following commands for all faces and edges
    dspobjIter.Name = "huh"
    sessUF.Attr.SetStringUserAttribute(dspobjIter.Tag, TYSA_NAME, 0, dspobjIter.Name, true);
    sessUF.Attr.SetStringUserAttribute(dspobjIter.Tag, TYSA_UNAME, 0, dspobjIter.Name, true);

 

I save the part as prt file and x_t file

 

I read the files and examine names for all faces and edges using the following commands:
    string strName, strUName;
    bool bPresent;
    // dspobj.Name
    sessUF.Attr.GetStringUserAttribute(dspobjIter.Tag, TYSA_NAME, 0, out strName, out bPresent);
    sessUF.Attr.GetStringUserAttribute(dspobjIter.Tag, TYSA_UNAME, 0, out strUName, out bPresent);

The prt file has the names for faces and edges in all 3 forms

 

Upon reading the x_t file, I observe the names only for faces and only for the Name property, not SDL/TYSA_NAME and SDL/TYSA_UNAME.  My observation about SDL/TYSA_NAME and SDL/TYSA_UNAME being empty for faces conflicts with my original posting and more recent tests are unable to show any connection between the Name property and SDL/TYSA_NAME and SDL/TYSA_UNAME from the x_t file.

I'm going to try some further testing where I set SDL/TYSA_NAME and SDL/TYSA_UNAME to be deliberately different from the Name property.


I should probably restate my original issue:
I need to set names for faces and edges in an x_t file, then read into NX and see those names.  It works fine for faces, but I cannot get it to work for edges.

Re: Trouble reading EDGE names

Esteemed Contributor
Esteemed Contributor

Might be that parasolid only supports face attributes, one would have to ask Siemens about this.

Stefan Pendl, Systemmanager CAx, HAIDLMAIR GmbH
Production: NX10.0.3, VERICUT 8.0, FBM, MRL 3.1.4 | TcUA 10.1 MP7 Patch 0 (10.1.7.0) | TcVis 10.1
Development: VB.NET, Tcl/Tk    Testing: NX12.0

How to Get the Most from Your Signature in the Community