[CONNECT .NET, C++] ItemTypeLibrary Create (string name, DgnFile dgnfile, bool forCopy)

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.

Parents Reply
  • 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 

Children
No Data