Showing results for 
Search instead for 
Do you mean 

Having difficulty reading parasolid attributes via NXOPEN.

I have some attributes in a parasolid (x_t) file that I need to read after importing into NX.
I am unable to see these any sign of these attributes from the XT user interface of via any of the following calls:

    NXOpen.NXObject.AttributeInformation[] arr_info
        = faceIter.GetUserAttributes();


    NXOpen.NXObject.AttributeInformation[] arr_info2
        = faceIter.GetAttributeTitlesByType(NXObject.AttributeType.String);


    int nAttrCount;
    ufsess.Attr.CountAttributes(faceIter.Tag, NXOpen.UF.UFConstants.UF_ATTR_any, out nAttrCount);
    GGG.Writev("", nAttrCount);


    NXOpen.UF.UFAttr.Iterator ufattriter = new NXOpen.UF.UFAttr.Iterator();
    ufsess.Attr.InitUserAttributeIterator(ref ufattriter);
    int nUserAttrCount;
    ufsess.Attr.CountUserAttributes(faceIter.Tag, ref ufattriter, out nUserAttrCount);


Nothing in the NXOPEN documentation says that NX attributes have any relationship with attributes in Parasolid, so perhaps this isn't supposed to work.  If there is a solution, or if this isn't supposed to work, I would appreciate knowing about it.


This inquiry is part of an effort to get edge names from a parasolid file into NX. 
An earlier post explores a more direct approach:
    "Trouble reading EDGE names"


Yet another post will follow that shares some difficulty accessing Parasolid objects via:


Re: Having difficulty reading parasolid attributes via NXOPEN.

I don't know this for a fact, but I would expect that Parasolid attributes are *not* converted to NX attributes when you import a Parasolid XT file. Your experience seems to support this opinion -- if you can't see that NX attributes using the function calls you listed, then they' probably don't exist.


If you want to read attributes from an XT file, you will either have to learn how to read XT data (the file format is open and documented), or buy a Parasolid license of some sort. I think there are low-cost Parasolid licenses that just allow you to read and write Parasolid data.


Re: Having difficulty reading parasolid attributes via NXOPEN.

I solved the problem via workaround.

The workwaound: Access parasolids via AskPsTagOfObject(..)


It works, but I am leavaing this posting unsolved, since NXOPEN documentation advises to avoid access via parasolids.