Search Results for

    Show / Hide Table of Contents

    Interface IDocuments

    Gives access to documents.

    Namespace: TopSolid.Kernel.Automating
    Assembly: cs.temp.dll.dll
    Syntax
    [AvailableSinceVersion(7, 6, 0, 0)]
    public interface IDocuments
    Remarks

    This interface is available since v7.6.

    Properties

    EditedDocument

    Gets or sets the document being edited.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    DocumentId EditedDocument { get; set; }
    Property Value
    Type Description
    DocumentId
    Remarks

    If there is no document being edited, Empty is returned.

    This property is available since v7.6.

    EditingContextDocument

    Gets the context document in which the edited document is being edited.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    DocumentId EditingContextDocument { get; }
    Property Value
    Type Description
    DocumentId
    Remarks

    If there is no editing context document, Empty is returned.

    This property is available since v7.6.

    Methods

    CanExport(Int32, DocumentId)

    Tells whether an exporter can export a document.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    bool CanExport(int inExporterIx, DocumentId inDocumentId)
    Parameters
    Type Name Description
    System.Int32 inExporterIx

    Index of exporter to analyze, within [0, ExporterCount-1].

    DocumentId inDocumentId

    Identifier of document to export.

    Returns
    Type Description
    System.Boolean

    Whether the exporter can export the specified document.

    Remarks

    This method is available since v7.6.

    CanInclude(Int32, DocumentId)

    Tells whether an importer can include into a document.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    bool CanInclude(int inImporterIx, DocumentId inDocumentId)
    Parameters
    Type Name Description
    System.Int32 inImporterIx

    Index of importer to analyze, within [0, ImporterCount-1].

    DocumentId inDocumentId

    Document where data are to be stored.

    Returns
    Type Description
    System.Boolean

    Whether the importer can include into the specified document.

    Remarks

    This method is available since v7.6.

    CanPrint(DocumentId)

    Tells whether a document can be printed.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    bool CanPrint(DocumentId inDocumentId)
    Parameters
    Type Name Description
    DocumentId inDocumentId

    Document to print.

    Returns
    Type Description
    System.Boolean

    Document can be printed.

    Remarks

    This method is available since v7.6.

    Close(DocumentId, Boolean, Boolean)

    Closes a document.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    void Close(DocumentId inDocumentId, bool inAsksUser, bool inSaves)
    Parameters
    Type Name Description
    DocumentId inDocumentId

    Identifier of the document to close.

    System.Boolean inAsksUser

    Whether to ask the user for confirmation if the document needs to be saved.

    System.Boolean inSaves

    Whether to automatically save the document if it needs it when the user is not asked for confirmation.

    Remarks

    This method must not be called between StartModification(String, Boolean) and EndModification(Boolean, Boolean) methods calls.

    This method is available since v7.6.

    CloseAll(Boolean, Boolean)

    Closes all documents.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    void CloseAll(bool inAsksUser, bool inSaves)
    Parameters
    Type Name Description
    System.Boolean inAsksUser

    Whether to ask the user for confirmation if some documents need to be saved.

    System.Boolean inSaves

    Whether to automatically save the documents that need it when the user is not asked for confirmation.

    Remarks

    This method must not be called between StartModification(String, Boolean) and EndModification(Boolean, Boolean) methods calls.

    This method is available since v7.6.

    Consult(DocumentId)

    Opens a document in read only.

    Declaration
    [AvailableSinceVersion(7, 7, 201, 140)]
    void Consult(DocumentId ioDocumentId)
    Parameters
    Type Name Description
    DocumentId ioDocumentId

    Identifier of the document to consult.

    Remarks

    This method is available since v7.7.201.140.

    Drop(DocumentId)

    Drops a document into the document being edited.

    Declaration
    [AvailableSinceVersion(7, 8, 0, 0)]
    string Drop(DocumentId inDocumentId)
    Parameters
    Type Name Description
    DocumentId inDocumentId

    Identifier of the document to drop.

    Returns
    Type Description
    System.String

    Full name of the drag and drop command invoked, or null if none.

    Remarks

    Calling this method is equivalent to manually dragging and dropping a document from the project tree into the document being edited.

    After this method is called, the following steps are directly managed by the user interface.

    This method must not be called between StartModification(String, Boolean) and EndModification(Boolean, Boolean) methods calls.

    This method is available since v7.8.

    EnsureIsDirty(ref DocumentId)

    Ensures that a document is dirty before performing modifications.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    void EnsureIsDirty(ref DocumentId ioDocumentId)
    Parameters
    Type Name Description
    DocumentId ioDocumentId

    Identifier of the document to modify (IN) / identifier of the document ready to be modified (OUT).

    Remarks

    A new revision of the document may have been created, in which case the returned document is not the same than the initial document.

    An exception is thrown if the document cannot be modified.

    This method must be called before any modification is attempted on a document.

    StartModification(String, Boolean) must be called before calling this method.

    This method is available since v7.6.

    Examples
     DocumentId docId = TopSolidHost.Documents.EditedDocument;
        if (docId.IsEmpty) return;
    
        if (TopSolidHost.Application.StartModification("My Modification", false)) 
        {
            try
            {
                TopSolidHost.Documents.EnsureIsDirty(ref docId);
    
                // Perform my modification on document.
    
                TopSolidHost.Application.EndModification(true, true);
            }
            catch
            {
                TopSolidHost.Application.EndModification(false, false);
            }
        }

    Exists(DocumentId)

    Tells whether a document still exists.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    bool Exists(DocumentId inDocumentId)
    Parameters
    Type Name Description
    DocumentId inDocumentId

    Identifier of the document to analyze.

    Returns
    Type Description
    System.Boolean

    The document still exists.

    Remarks

    This method is available since v7.6.

    Export(Int32, DocumentId, String)

    Exports a document to a file with conversion.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    void Export(int inExporterIx, DocumentId inDocumentId, string inFullName)
    Parameters
    Type Name Description
    System.Int32 inExporterIx

    Index of exporter to use, within [0, ExporterCount-1].

    DocumentId inDocumentId

    Identifier of document to export.

    System.String inFullName

    Full name of the file to create.

    Remarks

    This method must not be called between StartModification(String, Boolean) and EndModification(Boolean, Boolean) methods calls.

    This method is available since v7.6.

    ExportWithOptions(Int32, List<KeyValue>, DocumentId, String)

    Exports a document to a file with conversion using specified options.

    Declaration
    [AvailableSinceVersion(7, 8, 0, 0)]
    void ExportWithOptions(int inExporterIx, List<KeyValue> inOptions, DocumentId inDocumentId, string inFullName)
    Parameters
    Type Name Description
    System.Int32 inExporterIx

    Index of exporter to use, within [0, ExporterCount-1].

    List<KeyValue> inOptions

    Exporter options to use.

    DocumentId inDocumentId

    Identifier of document to export.

    System.String inFullName

    Full name of the file to create.

    Remarks

    This method must not be called between StartModification(String, Boolean) and EndModification(Boolean, Boolean) methods calls.

    This method is available since v7.8.

    Freeze(DocumentId)

    Freezes a document.

    Declaration
    [AvailableSinceVersion(7, 12, 0, 0)]
    void Freeze(DocumentId inDocumentId)
    Parameters
    Type Name Description
    DocumentId inDocumentId

    Identifier of the document to modify.

    Remarks

    An exception will be thrown when trying to freeze a document that is not freezable.

    StartModification(String, Boolean) and EnsureIsDirty(ref DocumentId) must be called before calling this method.

    This method is available since v7.12.

    GetCurrentCulture(DocumentId)

    Gets the document current culture.

    Declaration
    [AvailableSinceVersion(7, 16, 400, 0)]
    CultureInfo GetCurrentCulture(DocumentId inDocumentId)
    Parameters
    Type Name Description
    DocumentId inDocumentId

    Identifier of the document.

    Returns
    Type Description
    System.Globalization.CultureInfo

    The culture of the document.

    Remarks

    This method is available since v7.16.

    GetDocument(PdmObjectId)

    Gets the document corresponding to the last minor revision of a document PDM object.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    DocumentId GetDocument(PdmObjectId inPdmObjectId)
    Parameters
    Type Name Description
    PdmObjectId inPdmObjectId

    Identifier of the document PDM object.

    Returns
    Type Description
    DocumentId

    Identifier of the document corresponding to the last minor revision.

    Remarks

    If the PDM object is not a TopSolid document, this method returns Empty.

    This method is available since v7.6.

    GetDocuments()

    Gets all the documents loaded into memory.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    List<DocumentId> GetDocuments()
    Returns
    Type Description
    List<DocumentId>

    Documents found.

    Remarks

    This method is available since v7.6.

    GetMinorRevisionDocument(PdmMinorRevisionId)

    Gets the document corresponding to a PDM minor revision.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    DocumentId GetMinorRevisionDocument(PdmMinorRevisionId inMinorRevisionId)
    Parameters
    Type Name Description
    PdmMinorRevisionId inMinorRevisionId

    Identifier of the PDM minor revision to analyze.

    Returns
    Type Description
    DocumentId

    Identifier of the corresponding document.

    Remarks

    If the PDM minor revision is not a TopSolid document, this method returns Empty.

    This method is available since v7.6.

    GetName(DocumentId)

    Gets the name of a document.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    string GetName(DocumentId inDocumentId)
    Parameters
    Type Name Description
    DocumentId inDocumentId

    Identifier of the document to analyze.

    Returns
    Type Description
    System.String

    Name of the document.

    Remarks

    This method is available since v7.6.

    GetOpenDocuments()

    Gets the open documents.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    List<DocumentId> GetOpenDocuments()
    Returns
    Type Description
    List<DocumentId>

    Documents found.

    Remarks

    This method is available since v7.6.

    GetPdmMinorRevision(DocumentId)

    Gets the PDM minor revision corresponding to a document.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    PdmMinorRevisionId GetPdmMinorRevision(DocumentId inDocumentId)
    Parameters
    Type Name Description
    DocumentId inDocumentId

    Identifier of the document to analyze.

    Returns
    Type Description
    PdmMinorRevisionId

    Identifier of the corresponding PDM minor revision.

    Remarks

    This method is available since v7.6.

    GetPdmObject(DocumentId)

    Gets the PDM object corresponding to a document.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    PdmObjectId GetPdmObject(DocumentId inDocumentId)
    Parameters
    Type Name Description
    DocumentId inDocumentId

    Identifier of the document to analyze.

    Returns
    Type Description
    PdmObjectId

    Identifier of the corresponding PDM object.

    Remarks

    This method is available since v7.6.

    GetProperties(DocumentId)

    Gets the full names of the properties of a document.

    Declaration
    [AvailableSinceVersion(7, 8, 300, 60)]
    List<string> GetProperties(DocumentId inDocumentId)
    Parameters
    Type Name Description
    DocumentId inDocumentId

    Identifier of the document to analyze.

    Returns
    Type Description
    List<System.String>

    Full names of the document properties.

    Remarks

    This method is available since v7.8.300.60.

    GetPropertyBooleanValue(DocumentId, String)

    Gets the value of a document Boolean property.

    Declaration
    [AvailableSinceVersion(7, 8, 300, 60)]
    bool GetPropertyBooleanValue(DocumentId inDocumentId, string inFullName)
    Parameters
    Type Name Description
    DocumentId inDocumentId

    Identifier of the document to analyze.

    System.String inFullName

    Full name of the document Boolean property to analyze.

    Returns
    Type Description
    System.Boolean

    Value of the property.

    Remarks

    This method is available since v7.8.300.60.

    GetPropertyDateTimeValue(DocumentId, String)

    Gets the value of a document date and time property.

    Declaration
    [AvailableSinceVersion(7, 8, 300, 60)]
    DateTime GetPropertyDateTimeValue(DocumentId inDocumentId, string inFullName)
    Parameters
    Type Name Description
    DocumentId inDocumentId

    Identifier of the document to analyze.

    System.String inFullName

    Full name of the document date and time property to analyze.

    Returns
    Type Description
    System.DateTime

    Value of the property.

    Remarks

    This method is available since v7.8.300.60.

    GetPropertyIntegerValue(DocumentId, String)

    Gets the value of a document integer property.

    Declaration
    [AvailableSinceVersion(7, 8, 300, 60)]
    int GetPropertyIntegerValue(DocumentId inDocumentId, string inFullName)
    Parameters
    Type Name Description
    DocumentId inDocumentId

    Identifier of the document to analyze.

    System.String inFullName

    Full name of the document integer property to analyze.

    Returns
    Type Description
    System.Int32

    Value of the property.

    Remarks

    This method is available since v7.8.300.60.

    GetPropertyLocalizedDomainName(DocumentId, String)

    Gets the localized domain name of a document property.

    Declaration
    [AvailableSinceVersion(7, 8, 300, 60)]
    string GetPropertyLocalizedDomainName(DocumentId inDocumentId, string inFullName)
    Parameters
    Type Name Description
    DocumentId inDocumentId

    Identifier of the document to analyze.

    System.String inFullName

    Full name of the document property to analyze.

    Returns
    Type Description
    System.String

    Localized domain name of the property.

    Remarks

    This method is available since v7.8.300.60.

    GetPropertyLocalizedName(DocumentId, String)

    Gets the localized name of a document property.

    Declaration
    [AvailableSinceVersion(7, 8, 300, 60)]
    string GetPropertyLocalizedName(DocumentId inDocumentId, string inFullName)
    Parameters
    Type Name Description
    DocumentId inDocumentId

    Identifier of the document to analyze.

    System.String inFullName

    Full name of the document property to analyze.

    Returns
    Type Description
    System.String

    Localized name of the property.

    Remarks

    This method is available since v7.8.300.60.

    GetPropertyRealUnit(DocumentId, String, out UnitType, out String)

    Gets the unit of a document real property.

    Declaration
    [AvailableSinceVersion(7, 8, 300, 60)]
    void GetPropertyRealUnit(DocumentId inDocumentId, string inFullName, out UnitType outUnitType, out string outUnitSymbol)
    Parameters
    Type Name Description
    DocumentId inDocumentId

    Identifier of the document to analyze.

    System.String inFullName

    Full name of the document real property to analyze.

    UnitType outUnitType

    Unit type.

    System.String outUnitSymbol

    Unit symbol in English.

    Remarks

    This method is available since v7.8.300.60.

    GetPropertyRealValue(DocumentId, String)

    Gets the value of a document real property.

    Declaration
    [AvailableSinceVersion(7, 8, 300, 60)]
    double GetPropertyRealValue(DocumentId inDocumentId, string inFullName)
    Parameters
    Type Name Description
    DocumentId inDocumentId

    Identifier of the document to analyze.

    System.String inFullName

    Full name of the document real property to analyze.

    Returns
    Type Description
    System.Double

    Value of the property.

    Remarks

    This method is available since v7.8.300.60.

    GetPropertyTextValue(DocumentId, String)

    Gets the value of a document text property.

    Declaration
    [AvailableSinceVersion(7, 8, 300, 60)]
    string GetPropertyTextValue(DocumentId inDocumentId, string inFullName)
    Parameters
    Type Name Description
    DocumentId inDocumentId

    Identifier of the document to analyze.

    System.String inFullName

    Full name of the document text property to analyze.

    Returns
    Type Description
    System.String

    Value of the property.

    Remarks

    This method is available since v7.8.300.60.

    GetPropertyType(DocumentId, String)

    Gets the type of a document property.

    Declaration
    [AvailableSinceVersion(7, 8, 300, 60)]
    PropertyType GetPropertyType(DocumentId inDocumentId, string inFullName)
    Parameters
    Type Name Description
    DocumentId inDocumentId

    Identifier of the document to analyze.

    System.String inFullName

    Full name of the document property to analyze.

    Returns
    Type Description
    PropertyType

    Type of the property, or None if the document does not have the property.

    Remarks

    This method is available since v7.8.300.60.

    GetReferencedDocuments(DocumentId, Boolean)

    Gets the documents referenced by a document.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    List<DocumentId> GetReferencedDocuments(DocumentId inDocumentId, bool inRequiresDependence)
    Parameters
    Type Name Description
    DocumentId inDocumentId

    Identifier of the document to analyze.

    System.Boolean inRequiresDependence

    Whether to only return documents on which the document to analyze depends on, and ignore logical references, like for instance background documents.

    Returns
    Type Description
    List<DocumentId>

    Referenced documents found.

    Remarks

    This method is available since v7.6.

    GetSynchronizedDocuments(DocumentId)

    Gets the documents synchronized with a document.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    List<DocumentId> GetSynchronizedDocuments(DocumentId inDocumentId)
    Parameters
    Type Name Description
    DocumentId inDocumentId

    Identifier of the document to analyze.

    Returns
    Type Description
    List<DocumentId>

    Synchronized documents found.

    Remarks

    This method is available since v7.6.

    GetTypeFullName(DocumentId)

    Gets the full name of the type of a document.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    string GetTypeFullName(DocumentId inDocumentId)
    Parameters
    Type Name Description
    DocumentId inDocumentId

    Identifier of the document to analyze.

    Returns
    Type Description
    System.String

    Full name of the type of the document.

    Remarks

    This method is available since v7.6.

    GetTypeGuid(DocumentId)

    Gets the GUID of the type of a document.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    Guid GetTypeGuid(DocumentId inDocumentId)
    Parameters
    Type Name Description
    DocumentId inDocumentId

    Identifier of the document to analyze.

    Returns
    Type Description
    System.Guid

    GUID of the type of the document.

    Remarks

    This method is available since v7.6.

    GetUniversalId(DocumentId, out String, out String)

    Gets the universal identifier of a document.

    Declaration
    [AvailableSinceVersion(7, 8, 0, 0)]
    void GetUniversalId(DocumentId inDocumentId, out string outDomain, out string outName)
    Parameters
    Type Name Description
    DocumentId inDocumentId

    Identifier of the document to analyze.

    System.String outDomain

    Universal domain, or null if the document does not have a universal identifier.

    System.String outName

    Universal name, or null if the document does not have a universal identifier.

    Remarks

    This method is available since v7.8.

    Import(Int32, String, PdmObjectId, out List<String>, out List<DocumentId>)

    Imports a file with conversion into a project or one of its folders.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    List<DocumentId> Import(int inImporterIx, string inFullName, PdmObjectId inOwnerId, out List<string> outLog, out List<DocumentId> outBadDocumentIds)
    Parameters
    Type Name Description
    System.Int32 inImporterIx

    Index of importer to use, within [0, ImporterCount-1].

    System.String inFullName

    Full name of the file to import.

    PdmObjectId inOwnerId

    PDM object identifier of project or folder owner where imported documents are to be stored.

    List<System.String> outLog

    List of string describing the result.

    List<DocumentId> outBadDocumentIds

    Identifiers of documents containing bad geometry.

    Returns
    Type Description
    List<DocumentId>

    Imported documents.

    Remarks

    This method must not be called between StartModification(String, Boolean) and EndModification(Boolean, Boolean) methods calls.

    This method is available since v7.6.

    ImportWithOptions(Int32, List<KeyValue>, String, PdmObjectId, out List<String>, out List<DocumentId>)

    Imports a file with conversion into a project or one of its folders using specified options.

    Declaration
    [AvailableSinceVersion(7, 8, 0, 0)]
    List<DocumentId> ImportWithOptions(int inImporterIx, List<KeyValue> inOptions, string inFullName, PdmObjectId inOwnerId, out List<string> outLog, out List<DocumentId> outBadDocumentIds)
    Parameters
    Type Name Description
    System.Int32 inImporterIx

    Index of importer to use, within [0, ImporterCount-1].

    List<KeyValue> inOptions

    Importer options to use.

    System.String inFullName

    Full name of the file to import.

    PdmObjectId inOwnerId

    PDM object identifier of project or folder owner where imported documents are to be stored.

    List<System.String> outLog

    List of string describing the result.

    List<DocumentId> outBadDocumentIds

    Identifiers of documents containing bad geometry.

    Returns
    Type Description
    List<DocumentId>

    Imported documents.

    Remarks

    This method must not be called between StartModification(String, Boolean) and EndModification(Boolean, Boolean) methods calls.

    This method is available since v7.8.

    Include(Int32, String, DocumentId, out List<String>, out List<DocumentId>)

    Imports a file with conversion into an existing document.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    List<DocumentId> Include(int inImporterIx, string inFullName, DocumentId inDocumentId, out List<string> outLog, out List<DocumentId> outBadDocumentIds)
    Parameters
    Type Name Description
    System.Int32 inImporterIx

    Index of importer to use, within [0, ImporterCount-1].

    System.String inFullName

    Full name of the file to import.

    DocumentId inDocumentId

    Document where data are to be stored.

    List<System.String> outLog

    List of string describing the result.

    List<DocumentId> outBadDocumentIds

    Identifiers of documents containing bad geometry.

    Returns
    Type Description
    List<DocumentId>

    Imported documents, including the specified document.

    Remarks

    StartModification(String, Boolean) and EnsureIsDirty(ref DocumentId) must be called before calling this method.

    This method is available since v7.6.

    IncludeWithOptions(Int32, List<KeyValue>, String, DocumentId, out List<String>, out List<DocumentId>)

    Imports a file with conversion into an existing document using specified options.

    Declaration
    [AvailableSinceVersion(7, 8, 0, 0)]
    List<DocumentId> IncludeWithOptions(int inImporterIx, List<KeyValue> inOptions, string inFullName, DocumentId inDocumentId, out List<string> outLog, out List<DocumentId> outBadDocumentIds)
    Parameters
    Type Name Description
    System.Int32 inImporterIx

    Index of importer to use, within [0, ImporterCount-1].

    List<KeyValue> inOptions

    Importer options to use.

    System.String inFullName

    Full name of the file to import.

    DocumentId inDocumentId

    Document where data are to be stored.

    List<System.String> outLog

    List of string describing the result.

    List<DocumentId> outBadDocumentIds

    Identifiers of documents containing bad geometry.

    Returns
    Type Description
    List<DocumentId>

    Imported documents, including the specified document.

    Remarks

    StartModification(String, Boolean) and EnsureIsDirty(ref DocumentId) must be called before calling this method.

    This method is available since v7.8.

    IsDirty(DocumentId)

    Tells whether a document is dirty.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    bool IsDirty(DocumentId inDocumentId)
    Parameters
    Type Name Description
    DocumentId inDocumentId

    Identifier of the document to analyze.

    Returns
    Type Description
    System.Boolean

    The document is dirty.

    Remarks

    A document is said dirty when it has been modified since it was last saved.

    This method is available since v7.6.

    IsFreezable(DocumentId)

    Tells whether a document may be frozen.

    Declaration
    [AvailableSinceVersion(7, 12, 0, 0)]
    bool IsFreezable(DocumentId inDocumentId)
    Parameters
    Type Name Description
    DocumentId inDocumentId

    Identifier of the document to analyze.

    Returns
    Type Description
    System.Boolean

    The document may be frozen.

    Remarks

    This method is available since v7.12.

    IsFrozen(DocumentId)

    Tells whether a document is frozen.

    Declaration
    [AvailableSinceVersion(7, 12, 0, 0)]
    bool IsFrozen(DocumentId inDocumentId)
    Parameters
    Type Name Description
    DocumentId inDocumentId

    Identifier of the document to analyze.

    Returns
    Type Description
    System.Boolean

    The document is frozen.

    Remarks

    This method is available since v7.12.

    IsInvalid(DocumentId)

    Tells whether a document is invalid.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    bool IsInvalid(DocumentId inDocumentId)
    Parameters
    Type Name Description
    DocumentId inDocumentId

    Identifier of the document to analyze.

    Returns
    Type Description
    System.Boolean

    The document is invalid.

    Remarks

    This method is available since v7.6.

    IsSynchronized(DocumentId)

    Tells whether a document is synchronized with other documents.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    bool IsSynchronized(DocumentId inDocumentId)
    Parameters
    Type Name Description
    DocumentId inDocumentId

    Identifier of the document to analyze.

    Returns
    Type Description
    System.Boolean

    The document is synchronized with other documents.

    Remarks

    This method is available since v7.6.

    IsVirtualDocument(DocumentId)

    Determines whether the document is virtual.

    Declaration
    [AvailableSinceVersion(7, 17, 0, 0)]
    bool IsVirtualDocument(DocumentId inDocumentId)
    Parameters
    Type Name Description
    DocumentId inDocumentId

    Identifier of the document to analyse.

    Returns
    Type Description
    System.Boolean

    Tells wether the document is virtual.

    Remarks

    This method is available since v7.17.

    NeedsRefreshing(DocumentId)

    Tells whether a document needs refreshing.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    bool NeedsRefreshing(DocumentId inDocumentId)
    Parameters
    Type Name Description
    DocumentId inDocumentId

    Identifier of the document to analyze.

    Returns
    Type Description
    System.Boolean

    The document needs refreshing.

    Remarks

    This method is available since v7.6.

    Open(ref DocumentId)

    Opens a document.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    void Open(ref DocumentId ioDocumentId)
    Parameters
    Type Name Description
    DocumentId ioDocumentId

    Identifier of the document to open.

    Remarks

    Beware the document can be modified if it is updated during opening process.

    This method must not be called between StartModification(String, Boolean) and EndModification(Boolean, Boolean) methods calls.

    This method is available since v7.6.

    Print(DocumentId, PrintColorMapping, Int32)

    Prints a document to the active printer.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    void Print(DocumentId inDocumentId, PrintColorMapping inColorMapping, int inResolution)
    Parameters
    Type Name Description
    DocumentId inDocumentId

    Document to print.

    PrintColorMapping inColorMapping

    Color conversion mode.

    System.Int32 inResolution

    Print resolution in dot-per-inch.

    Remarks

    This method is available since v7.6.

    Rebuild(DocumentId)

    Rebuilds a document.

    Declaration
    [AvailableSinceVersion(7, 8, 0, 0)]
    void Rebuild(DocumentId inDocumentId)
    Parameters
    Type Name Description
    DocumentId inDocumentId

    Identifier of the document to rebuild.

    Remarks

    StartModification(String, Boolean) and EnsureIsDirty(ref DocumentId) must be called before calling this method.

    This method is available since v7.8.

    Refresh(DocumentId)

    Refreshes a document.

    Declaration
    [AvailableSinceVersion(7, 8, 0, 0)]
    void Refresh(DocumentId inDocumentId)
    Parameters
    Type Name Description
    DocumentId inDocumentId

    Identifier of the document to refresh.

    Remarks

    StartModification(String, Boolean) and EnsureIsDirty(ref DocumentId) must be called before calling this method.

    This method is available since v7.8.

    Save(DocumentId)

    Saves a document.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    void Save(DocumentId inDocumentId)
    Parameters
    Type Name Description
    DocumentId inDocumentId

    Identifier of the document to save.

    Remarks

    This method must not be called between StartModification(String, Boolean) and EndModification(Boolean, Boolean) methods calls.

    This method is available since v7.6.

    SaveAs(DocumentId, PdmObjectId, String)

    Saves a document as a new document.

    Declaration
    [AvailableSinceVersion(7, 11, 0, 0)]
    DocumentId SaveAs(DocumentId inDocumentId, PdmObjectId inOwnerId, string inName)
    Parameters
    Type Name Description
    DocumentId inDocumentId

    Document identifier to save as.

    PdmObjectId inOwnerId

    Owner object identifier.

    System.String inName

    Name of the created document.

    Returns
    Type Description
    DocumentId

    Created document identifier.

    Remarks

    This method is available since v7.11.

    SetCurrentCulture(DocumentId, CultureInfo)

    Sets the document current culture.

    Declaration
    [AvailableSinceVersion(7, 16, 400, 0)]
    void SetCurrentCulture(DocumentId inDocumentId, CultureInfo inWantedCulture)
    Parameters
    Type Name Description
    DocumentId inDocumentId

    Identifier of the document to modify.

    System.Globalization.CultureInfo inWantedCulture

    The wanted culture.

    Remarks

    StartModification(String, Boolean) and EnsureIsDirty(ref DocumentId) must be called before calling this method.

    This method is available since v7.16.

    SetName(DocumentId, String)

    Sets the name of a document.

    Declaration
    [AvailableSinceVersion(7, 7, 201, 100)]
    void SetName(DocumentId inDocumentId, string inName)
    Parameters
    Type Name Description
    DocumentId inDocumentId

    Identifier of the document to modify.

    System.String inName

    Name of the document.

    Remarks

    StartModification(String, Boolean) and EnsureIsDirty(ref DocumentId) must be called before calling this method.

    This method is available since v7.7.201.100.

    SetUniversalId(DocumentId, String, String)

    Sets the universal identifier of a document.

    Declaration
    [AvailableSinceVersion(7, 8, 300, 60)]
    void SetUniversalId(DocumentId inDocumentId, string inDomain, string inName)
    Parameters
    Type Name Description
    DocumentId inDocumentId

    Identifier of the document to modify.

    System.String inDomain

    Universal domain, or null to delete the universal identifier parameter entity.

    System.String inName

    Universal name, or null to delete the universal identifier parameter entity.

    Remarks

    StartModification(String, Boolean) and EnsureIsDirty(ref DocumentId) must be called before calling this method.

    This method is available since v7.8.300.060.

    SetVirtualDocumentMode(DocumentId, Boolean)

    Sets the virtual document mode.

    Declaration
    [AvailableSinceVersion(7, 17, 0, 0)]
    void SetVirtualDocumentMode(DocumentId inDocumentId, bool inIsOn)
    Parameters
    Type Name Description
    DocumentId inDocumentId

    Identifier of the document to modify.

    System.Boolean inIsOn

    Tells wether the document is virtual.

    Remarks

    This method is available since v7.17.

    SubscribeToEvents(Int32, String)

    Subscribes to documents events.

    Declaration
    [AvailableSinceVersion(7, 8, 0, 0)]
    void SubscribeToEvents(int inClientVersion, string inClientName)
    Parameters
    Type Name Description
    System.Int32 inClientVersion

    Version of TopSolid used to build the client application.

    System.String inClientName

    Client name.

    Remarks

    The version is defined by: Major * 100000000 + Minor * 1000000 + Build * 1000 + Revision.

    For example, v7.5.200.100 is represented by: 705200100.

    This method is available since v7.8.

    SubscribeToEventsTcp(Int32, String, String, Int32)

    Subscribes to documents events using TCP connection.

    Declaration
    [AvailableSinceVersion(7, 9, 0, 0)]
    void SubscribeToEventsTcp(int inClientVersion, string inClientName, string inClientAddress, int inClientPort)
    Parameters
    Type Name Description
    System.Int32 inClientVersion

    Version of TopSolid used to build the client application.

    System.String inClientName

    Client name.

    System.String inClientAddress

    Client IP address or "localhost" for local machine.

    System.Int32 inClientPort

    Client port used.

    Remarks

    The version is defined by: Major * 100000000 + Minor * 1000000 + Build * 1000 + Revision.

    For example, v7.5.200.100 is represented by: 705200100.

    This method is available since v7.9.

    Unfreeze(DocumentId)

    Unfreezes a document.

    Declaration
    [AvailableSinceVersion(7, 12, 0, 0)]
    void Unfreeze(DocumentId inDocumentId)
    Parameters
    Type Name Description
    DocumentId inDocumentId

    Identifier of the document to modify.

    Remarks

    StartModification(String, Boolean) and EnsureIsDirty(ref DocumentId) must be called before calling this method.

    This method is available since v7.12.

    UnsubscribeFromEvents(String)

    Unsubscribes from documents events.

    Declaration
    [AvailableSinceVersion(7, 8, 0, 0)]
    void UnsubscribeFromEvents(string inClientName)
    Parameters
    Type Name Description
    System.String inClientName

    Client name.

    Remarks

    This method is available since v7.8.

    UnsubscribeFromEventsTcp(String, String, Int32)

    Unsubscribes from documents events using TCP connection.

    Declaration
    [AvailableSinceVersion(7, 9, 0, 0)]
    void UnsubscribeFromEventsTcp(string inClientName, string inClientAddress, int inClientPort)
    Parameters
    Type Name Description
    System.String inClientName

    Client name.

    System.String inClientAddress

    Client IP address or "localhost" for local machine.

    System.Int32 inClientPort

    Client port used.

    Remarks

    This method is available since v7.9.

    Update(DocumentId, Boolean)

    Updates a document.

    Declaration
    [AvailableSinceVersion(7, 8, 0, 0)]
    void Update(DocumentId inDocumentId, bool inUpdatesAll)
    Parameters
    Type Name Description
    DocumentId inDocumentId

    Identifier of the document to update.

    System.Boolean inUpdatesAll

    Udpates all the document, even operations in stages after the current stage.

    Remarks

    StartModification(String, Boolean) and EnsureIsDirty(ref DocumentId) must be called before calling this method.

    This method is available since v7.8.

    zExportToTopglTF(DocumentId, String, String, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, Int32, Color)

    Exports the document to TopgltF.

    Declaration
    [AvailableSinceVersion(7, 17, 0, 0)]
    void zExportToTopglTF(DocumentId inDocumentId, string inFolderPath, string inFileName, bool inEmbedsBuffer, bool inExportsLights, bool inExportsCameras, bool inExportsFaces, bool inExportsSets, bool inExportsRepresentations, bool inExportsMaterials, int inMaxTextureSize, Color inEdgesColor)
    Parameters
    Type Name Description
    DocumentId inDocumentId

    Identifier of the document to export.

    System.String inFolderPath

    Folder path.

    System.String inFileName

    File name.

    System.Boolean inEmbedsBuffer

    Tells whether to embed buffer.

    System.Boolean inExportsLights

    Tells whether to export lights.

    System.Boolean inExportsCameras

    Tells whether to export cameras.

    System.Boolean inExportsFaces

    Tells whether to export faces.

    System.Boolean inExportsSets

    Tells whether to export sets.

    System.Boolean inExportsRepresentations

    Tells whether to export representations.

    System.Boolean inExportsMaterials

    Tells whether to export materials.

    System.Int32 inMaxTextureSize

    Tells the maximum texture size for materials.

    Color inEdgesColor

    Edges color.

    Remarks

    This method is available since v7.17.

    This method is for internal use of TopSolid.

    This method is useless for other needs.

    zExportToTopglTFWithRepresentation(DocumentId, String, String, String, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, Int32, Color)

    Exports the document to TopgltF.

    Declaration
    [AvailableSinceVersion(7, 19, 180, 0)]
    void zExportToTopglTFWithRepresentation(DocumentId inDocumentId, string inFolderPath, string inFileName, string inRepresentationName, bool inEmbedsBuffer, bool inExportsLights, bool inExportsCameras, bool inExportsFaces, bool inExportsSets, bool inExportsMaterials, int inMaxTextureSize, Color inEdgesColor)
    Parameters
    Type Name Description
    DocumentId inDocumentId

    Identifier of the document to export.

    System.String inFolderPath

    Folder path.

    System.String inFileName

    File name.

    System.String inRepresentationName

    Representation name.

    System.Boolean inEmbedsBuffer

    Tells whether to embed buffer.

    System.Boolean inExportsLights

    Tells whether to export lights.

    System.Boolean inExportsCameras

    Tells whether to export cameras.

    System.Boolean inExportsFaces

    Tells whether to export faces.

    System.Boolean inExportsSets

    Tells whether to export sets.

    System.Boolean inExportsMaterials

    Tells whether to export materials.

    System.Int32 inMaxTextureSize

    Tells the maximum texture size for materials.

    Color inEdgesColor

    Edges color.

    Remarks

    This method is available since v7.19.

    This method is for internal use of TopSolid.

    This method is useless for other needs.

    In This Article
    • Mentions légales
    • C.G.U
    • Données personnelles

    Copyright © 2024 TopSolid Tous droits réservés