The basic interface for an exporter.
More...
List of all members.
Public Member Functions |
HRESULT | DoExport ([in]BSTR fileName,[in]IUnknown *activeDocument,[in] IProgressCB *pCB) |
| Directs the exporter to perform the export.
|
Properties |
BSTR | Id [get] |
| The unique identifying string that distinguishes this exporter from all others.
|
BSTR | Description [get] |
| A brief description, suitable to appear in a open file dialog.
|
BSTR | FileExtension [get] |
| The file extension supported, of the form "*.xxx".
|
SkpExporterType | ExporterType [get] |
| The type of this exporter.
|
BOOL | AllowsExistingFiles [get] |
| A query to determine whether this exporter allows writing into existing files.
|
Detailed Description
The basic interface for an exporter.
In the original API, the analog of this interface was added to the SketchUp/Addin/ModelExport registry entry (in the case where it was a model exporter, as opposed to an HLRExporter or SectionExporter). In the 4.0 API, however, one registers an IEnumSketchUpExporter that can serve up these exporters.
Member Function Documentation
HRESULT ISketchUpExporter::DoExport |
( |
[in] BSTR |
fileName, |
|
|
[in] IUnknown * |
activeDocument, |
|
|
[in] IProgressCB * |
pCB | |
|
) |
| | |
Directs the exporter to perform the export.
- Parameters:
-
| fileName | The fully qualified path and file name to which the current model should be written |
| activeDocument | The ISkpDocument to be written. |
| pCB | A callback object that allows the exporter to report on the progress of the export. |
- Returns:
- S_OK : on success
S_FALSE : if the export was canceled, or failed in some acceptable manner
E_POINTER : if any of the required arguments are NULL
E_FAIL : internal errors
Property Documentation
BOOL ISketchUpExporter::AllowsExistingFiles [get] |
A query to determine whether this exporter allows writing into existing files.
While the majority of exporters will return FALSE in response to this query, there are some that can return TRUE. An example is the case where the "file" to which the model is being written is really a table within a database. In that case, the database is not being overwritten, but rather inserted into.
By returning TRUE, the SketchUp OpenFile dialog will not confirm an overwrite with the user when an existing file is picked. If the exporter returns FALSE, then the user is so prompted.
- Return values:
-
| pAllows | TRUE iff this exporter allows writing to existing files without prompting the user to confirm an overwrite. |
- Returns:
- S_OK : on success
E_POINTER : if any of the required arguments are NULL
E_FAIL : internal errors
BSTR ISketchUpExporter::Description [get] |
A brief description, suitable to appear in a open file dialog.
For example
- Return values:
-
| pDescription | the description. |
- Returns:
- S_OK : on success
E_POINTER : if any of the required arguments are NULL
E_FAIL : internal errors
SkpExporterType ISketchUpExporter::ExporterType [get] |
The type of this exporter.
- Note:
- This property is not currently used. In SketchUp 4.0 the IEnumSketchUpExporter must be registered in the appropriate category, and can only serve up exporters of a single type.
- Return values:
-
| pType | The type of this exporter. Must be one of the values in SkpExporterType:
-
ExporterTypeModel3d
-
ExporterTypeModel2d
-
ExporterTypeHLR
-
ExporterTypeSection
-
ExporterTypeImage
|
- Returns:
- S_OK : on success
E_POINTER : if any of the required arguments are NULL
E_FAIL : internal errors
BSTR ISketchUpExporter::FileExtension [get] |
The file extension supported, of the form "*.xxx".
For example
- Return values:
-
| pExtension | The extension in the specified format. |
- Returns:
- S_OK : on success
E_POINTER : if any of the required arguments are NULL
E_FAIL : internal errors
BSTR ISketchUpExporter::Id [get] |
The unique identifying string that distinguishes this exporter from all others.
For example
com.exporters-r-us.exporters.acad_dwg
- Return values:
-
| pID | The id of this exporter. |
- Returns:
- S_OK : on success
E_POINTER : if any of the required arguments are NULL
E_FAIL : internal errors