SPKMeshExportModelSettings

Creates Scene Layer Packages that can be shared on Online/Portal.

@example:
# Settings class used to control parameters for exporting models to Esri Scene Layer Package (spk)
exportSettings = SPKMeshExportModelSettings()
exportSettings.setOutputPath(ce.toFSPath("/general/models/batchExportTests"))
exportSettings.setBaseName("spkMesh_batchexport")
exportSettings.setSceneType("Local")
exportSettings.setFileSize(SPKMeshExportModelSettings.MIDSIZE_FILE)
ce.export(ce.selection()[0], exportSettings)

 

Methods defined here:

getBaseName

getBaseName(self):

Gets BaseName field. The WebScene name.

@return: Value of BaseName field.  [str]

getEmitReports

getEmitReports(self):

Gets EmitReports field. Export CGA reports generated on models.

@return: Value of EmitReports field.  [True/False]

getExistingFiles

getExistingFiles(self):

Gets ExistingFiles field. Specifies how files should be written during the export run. The log file will be written anyways.

@return: Value of ExistingFiles field.  ["OVERWRITE", "SKIP"] [str]

getExportGeometry

getExportGeometry(self):

Gets ExportGeometry field. Choose what geometry is exported. 'Models with Shape Fallback' writes the Start Shape if the Model generation fails. 'Models' skips to the next export item if the Model generation fails. 'Shapes' always writes the Start Shape and disregards the Model generation.

@return: Value of ExportGeometry field.  ["MODEL_GEOMETRY_FALLBACK", "MODEL_GEOMETRY", "SHAPE_GEOMETRY"] [str]

getExportLog

getExportLog(self):

Returns a dictionary containing details of the export.

@return: A dictionary containing details about the finished export.

getFeatureGranularity

getFeatureGranularity(self):

Gets FeatureGranularity field. Set Feature Granularity.

@return: Value of FeatureGranularity field.  ["FEATURE_PER_SHAPE", "FEATURE_PER_LEAF_SHAPE"] [str]

getFileSize

getFileSize(self):

Gets FileSize field. Defines the approximate file size and the limit of model details.

@return: Value of FileSize field.  ["SMALL_FILE", "MIDSIZE_FILE", "LARGE_FILE", "HUGE_FILE"] [str]

@example:
# getFileSize reflects what was set through setFileSize. It does not reflect what is set using setMaxDepth.
exportSettings = SPKMeshExportModelSettings()
print exportSettings.getFileSize()

getIgnoreLayers

getIgnoreLayers(self):

Gets IgnoreLayers field. Ignores the different layers and merges them into one layer.

@return: Value of IgnoreLayers field.  [True/False]

getLayerBackfaceCulling

getLayerBackfaceCulling(self):

Gets LayerBackfaceCulling field. Activate Backface Culling.

@return: Value of LayerBackfaceCulling field.  [True/False]

getMaxDepth

getMaxDepth(self):

Gets MaxDepth field. Specifies how deep the tree should be at most. This limits the package size.

@return: Value of MaxDepth field.  [int]

@example:
# getMaxDepth returns what was last set through either setFileSize or setMaxDepth.
exportSettings = SPKMeshExportModelSettings()
print exportSettings.getMaxDepth()

getOutputPath

getOutputPath(self):

Gets OutputPath field. Output directory for all exported files.

@return: Value of OutputPath field.  [str]

getSceneType

getSceneType(self):

Gets SceneType field. Specifies whether a local or a global scene should be created.

@return: Value of SceneType field.  ["Local", "Global"] [str]

getScript

getScript(self):

Gets Script field. Python script to use for export callbacks.

@return: Value of Script field.  [str]

getShapeNameDelimiter

getShapeNameDelimiter(self):

Gets ShapeNameDelimiter field. Delimiting character for resolution of shape name clashes.

@return: Value of ShapeNameDelimiter field.  [str]

getWriteLog

getWriteLog(self):

Gets WriteLog field. Write log file with statistics about this export session.

@return: Value of WriteLog field.  [True/False]

load

load(self, name):

Load the named settings from the current scene file.

@param name: The name of the settings to load.  [str]
@return: result. [SPKMeshExportModelSettings]

save

save(self, name):

Save the named settings to the current scene file.

@param name: The name of the settings to save.  [str]

setBaseName

setBaseName(self, stringValue):

Sets BaseName field. The WebScene name.

@param stringValue: the new value. [str]

setEmitReports

setEmitReports(self, booleanValue):

Sets EmitReports field. Export CGA reports generated on models.

@param booleanValue: the new value. [True/False]

setExistingFiles

setExistingFiles(self, stringValue):

Sets ExistingFiles field. Specifies how files should be written during the export run. The log file will be written anyways.

@param stringValue: the new value ["OVERWRITE", "SKIP"]. [str]

setExportGeometry

setExportGeometry(self, enumValue):

Sets ExportGeometry field. Choose what geometry is exported. 'Models with Shape Fallback' writes the Start Shape if the Model generation fails. 'Models' skips to the next export item if the Model generation fails. 'Shapes' always writes the Start Shape and disregards the Model generation.

@param enumValue: the new value ["MODEL_GEOMETRY_FALLBACK", "MODEL_GEOMETRY", "SHAPE_GEOMETRY"]. [str]

setFeatureGranularity

setFeatureGranularity(self, stringValue):

Sets FeatureGranularity field. Set Feature Granularity.

@param stringValue: the new value ["FEATURE_PER_SHAPE", "FEATURE_PER_LEAF_SHAPE"]. [str]

setFileSize

setFileSize(self, enumValue):

Sets FileSize field. Defines the approximate file size and the limit of model details.

@param enumValue: the new value ["SMALL_FILE", "MIDSIZE_FILE", "LARGE_FILE", "HUGE_FILE"]. [str]

@example:
# setFileSize overwrites what has been set using setMaxDepth.
exportSettings = SPKMeshExportModelSettings()
exportSettings.setFileSize(SPKMeshExportModelSettings.MIDSIZE_FILE)
ce.export(ce.selection()[0], exportSettings)

setIgnoreLayers

setIgnoreLayers(self, booleanValue):

Sets IgnoreLayers field. Ignores the different layers and merges them into one layer.

@param booleanValue: the new value. [True/False]

setLayerBackfaceCulling

setLayerBackfaceCulling(self, booleanValue):

Sets LayerBackfaceCulling field. Activate Backface Culling.

@param booleanValue: the new value. [True/False]

setMaxDepth

setMaxDepth(self, intValue):

Sets MaxDepth field. Specifies how deep the tree should be at most. This limits the package size.

@param intValue: the new value. [int]

@example:
# setMaxDepth overwrites what has been set using setFileSize.
exportSettings = SPKMeshExportModelSettings()
exportSettings.setMaxDepth(4)
ce.export(ce.selection()[0], exportSettings)

setOutputPath

setOutputPath(self, stringValue):

Sets OutputPath field. Output directory for all exported files.

@param stringValue: the new value. [str]

setSceneType

setSceneType(self, stringValue):

Sets SceneType field. Specifies whether a local or a global scene should be created.

@param stringValue: the new value ["Local", "Global"]. [str]

setScript

setScript(self, stringValue):

Sets Script field. Python script to use for export callbacks.

@param stringValue: the new value. [str]

setShapeNameDelimiter

setShapeNameDelimiter(self, stringValue):

Sets ShapeNameDelimiter field. Delimiting character for resolution of shape name clashes.

@param stringValue: the new value. [str]

setWriteLog

setWriteLog(self, booleanValue):

Sets WriteLog field. Write log file with statistics about this export session.

@param booleanValue: the new value. [True/False]

Constants

This class defines the following constants:

FEATURE_PER_LEAF_SHAPE = 'FEATURE_PER_LEAF_SHAPE'
FEATURE_PER_SHAPE = 'FEATURE_PER_SHAPE'
GLOBAL = 'Global'
HUGE_FILE = 'HUGE_FILE'
LARGE_FILE = 'LARGE_FILE'
LOCAL = 'Local'
MIDSIZE_FILE = 'MIDSIZE_FILE'
MODEL_GEOMETRY = 'MODEL_GEOMETRY'
MODEL_GEOMETRY_FALLBACK = 'MODEL_GEOMETRY_FALLBACK'
OVERWRITE = 'OVERWRITE'
SHAPE_GEOMETRY = 'SHAPE_GEOMETRY'
SKIP = 'SKIP'
SMALL_FILE = 'SMALL_FILE'