Hi,
I was wonder if the API (C++ and/or Python) has an helper function to generate a unique name for BaseTag
, or any BaseList2D
-derived object in general?
Example:
In case you create a polygon selection tag, it's default name is "Polygon Selection". Create an additional one and it will be named "Polygon Selection.1", etc ... Same for objects in the Object Manager.
This seems trivial functionality which is used on different places that I would assume it is a common function used throughout the application, when it needs to generate a default name for an object.
I understand this would be easy to set up one-self by looking up if the default name is already in use, and increment a suffix until the name is unique.
As I am lazy I'd rather use some existing implementation instead of trying the reinvent the wheel.
I just cannot figure out an appropriate function name to perform a search on. Hence I haven't yet found such helper function in the SDK ... if there is one available.