String attribute

I don’t know what you mean?

If you look at DNA_meshdata_types.h and look for struct MStringProperty, that’s the type that is used to store strings in CustomData CD_PROP_STRING layers.

The C++ attribute api probably uses std::string (I didn’t really look), but the strings will still be limited by what can actually be stored in the layers.

In that case, I really don’t know. So far, I am only familiar with the calculation process itself, so initially I considered only node restrictions.
This was also indicated at the beginning of this topic, but the technical aspect was also not taken into account there.

Hashing in your importer has the advantage that it can handle ‘unknown’ strings. But there’s also something to be said for Ilja’s suggestion of just using a mapping table to go from strings to integer ids. If you have consecutive integer ids you can use ‘pick instance’+‘instance id’ on an ‘instance on points’ node to get the correct object from a collection. Whereas with hashing you’ll get ‘random’ integer ids which would maybe make you geonodes code more complicated.

Hi again. Just a quick update. Having thought about the likely usage of my importer, I went ahead and implemented a hashing solution, which is now working as expected. Thus, as a trivial example, I can now colour individual faces in accordance with, say, their Description (text) attribute. Thus, there’s no particular restriction upon what type of features may be expected to be present within any one input file and I can be sure that a geonodes network that references a specific Description (hash) value will always work if it encounters features of a similar type in the future. The hash values themselves are being written to a dictionary, which I then also output as a basic reference text file.

This is obviously more awkward than using a string attribute directly, and I don’t get to use any name strings directly (say, as place names within a scene). However, it does, at least, give me significantly more functionality than I had previously. So, thank you, again, for your help.