Publish - Integration - Update 46 - Help - Hexagon

SmartPlant Integration .NET Help

Language
English
Product
Integration
Search by Category
Help
SmartPlant Foundation / SDx Version
10
Smart P&ID Version
9 (2019)
Smart Engineering Manager Version
10 (2019)

Publish involves two steps: document selection, which is an interactive process, and XML generation, which is a batch process.

Document Selection

  1. The software creates and loads the meta-schema, if not already done.

  2. SPCLServiceManager performs the following steps:

    1. Creates a container composition for the GenericDocument component schema.

    2. Creates a container for schema objects.

    3. Loads the GenericDocument component schema.

    4. Creates a container composition for document.

    5. Creates document containers (Metadata, Documents, Tombstones, and Message).

    6. For documents selected in the SmartPlant Foundation Web Client UI, calls SPCLClient to create and add document instances to the documents container.

    7. If the user selects documents in the tool UI, SPCLServiceManager calls the GetUserSelections method of the ISPToolDocs interface. The argument is the documents container created in step e. The tool creates and adds document instances to the documents container.

    8. In steps f and g, the following things will be done for each document:

      • Create an instance for document object in the passed documents container.

      • Get the IObject and IDocument interfaces.

      • Populate the UID, Name, and Description (optional) properties in IObject.

      • Populate DocTitle, DocCategory, DocType, and DocSubType (optional) in IDocument.

    9. For each document, create and add version and issue record objects to the metadata container.

    10. Establishes relationships between version object and IDocVersionComposition.

    11. Establishes relationships between issue record object and IIssueRecordComposition.

  3. Saves containers to XML files.

XML Generation (Actual Publish in Batch Process)

  1. Create and load the meta-schema, if not already done.

  2. SPCLServiceManager performs the following steps:

    1. Steps 2a through 2e of Document Selection. Loads saved XML containers (Document, Metadata).

    2. Sorts document objects by document type.

    3. Creates container composition for a component schema.

    4. For each document type:

      • Gets Component Schema UID by calling the GetCompSchemaUID method of the ISPAdapter interface. The tool adapter returns the Component Schema UID for a given document type.

      • Gets the class definition UID of Document by calling the GetDocClassDefUID method of the ISPAdapter interface. The tool adapter returns the UID of the class definition of the Document for a given component schema name.

      • Creates a container for schema objects.

      • Calls SPCLClient to get the Component Schema file.

      • Loads the Component Schema from the component schema file.

      • Creates a container composition for document.

    5. For each document object in a document type:

      • Create document containers (Metadata, Document, Tombstones, and Message).

      • Create an instance of the document object.

      • Copy the document object interfaces and relationships from the GenericDocument container composition to the Document container. The interfaces that are copied are IObject, IDocument, IDocVersionComposition, and IIssueRecordComposition.

      • Calls the PublishDocument method of the ISPAdapter. The arguments are DocumentIObj, document metadata container, and document container created in step above. The tool adapter creates and populates document data objects. The tool adapter adds the view file interface to the metadata container and sets the FilePath property to the absolute path of the graphic file associated with document.

      • Call SPCLClient to publish the document. The argument is container composition of document.

      • Releases the contents of the container composition of the document.

      • Releases the contents of the container composition of the Component Schema.

  3. Releases all containers and container compositions.