public static ItemTypeLibrary Create ( string name, DgnFile dgnfile, bool forCopy);
What is the purpose of the final argument forCopy in that method declaration? There's a similar method in the C++ class, with a similar absence of explanation in the help doc.
forCopy
Jon Summers said:What is the purpose of the final argument forCopy in that method declaration?
Good question ;-)
I found several other methods with the same parameter with this description:
If the object with the new name is a copy of the object of 'baseName', then new name will be built with "- Copy" suffix
Maybe it's valid also for ItemTypeLibrary::Create?
Regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
This is primarily used by the Item Types dialog - when the user copies an existing property, item type, or library.
If forCopy is false, and an existing item with the same name exists within the enclosing context, the functions returns nullptr, because names must be unique.
If forCopy is true, and an existing item with the same name exists, the functions will modify the input name to be unique within the enclosing context. e.g. "MyItemType - Copy", "MyItemType - Copy(1)", etc.
Answer Verified By: Jon Summers