You can import an object library from a XML file.
1.Replace the original title with your title In the XML file containing library objects, there are references to the title from where it was exported (if it was exported). The references appear as <keyVal>titlename</keyVal>, where titlename is the name of the destination title. E.g., if the destination title is Globe, it will be <keyVal>Globe</keyVal>. Such references are present all over the XML file. The screenshot shows how the title reference appears within a definition of a library object named circlepolygonbox: Before importing the XML file with the library objects in your title, ensure that title name is in all <keyVal>titlename</keyVal>. Use search and replace (all occurrences): search for <keyVal>oldname</keyVal> and replace with <keyVal>destination_title_name</keyVal>. Important: the <keyval statement is used in the XML file for other values as well so take all precautions when replacing not to replace wrong things. 2.Check if the library permissions is what you want, otherwise edit and adjust Library permissions are defined on top of the XML file, in the <access> element: Every permission item consists of: <securityAccess objectType="group"> <keyVal>Administrators</keyVal> <grant>all</grant> </securityAccess> where <keyval> encloses the name of the group, and <grant> encloses the permissions. There could be more <grant> statements, as in: <securityAccess objectType="group"> <keyVal>Everyone</keyVal> <grant>ReadNormal</grant> <grant>RefReadNormal</grant> </securityAccess> </access>
3.Change library name (if needed) Library name appears all along XML file. The first occurrence is in <lib name="libraryname">, in the definition of the library itself. Then, it appears within every object definition, as <keyVal>libraryname</keyVal>. Ensure you replace all occurrences with the changed name. |
In the Command prompt window, run this: c:\tera\gn4\main\bin\cmd4.exe import C:\tera\GN4\main\config\Data\GN4\lib_sysdefault.xml -UserName xxxx -Password yyyy where xxxx is the name of a GN4 user who can logon to system with sufficient permissions to perform this operation and yyyy is the password. Note: the above connects to the default connection: should you want to specify the connection or server name, see cmd4 examples. |
A XML file with library objects has the following structure: 1.The XML opening statements: <?xml version="1.0" encoding="utf-8"?>. 2.Name space definition: <objects xmlns="urn:schemas-teradp-com:gn4tera">. 3.Library name and other definitions, enclosed in <lib name="sysdefault">. 4.One definition per each library object, enclosed in <libObj xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="balloon" width="0" height="0"> The initial part of the file with all sections collapsed, looks like: A defalt library file sysdefault is stored in C:\tera\GN4\main\config\Data\GN4\lib_sysdefault.xml, from where you can import it into your title. |
See also
Import sysdefault library in your title