RPKExportSettings

RPKExportSettings.

@example:
# export settings for rule package exports
settings = RPKExportSettings()
settings.setRuleFile("/general/rules/rpkassets_simple.cga")
settings.addFile("/general/assets/sphere.obj")
settings.addFile("/general/assets/sphere.mtl")
settings.setAddFilesAutomatically()
settings.setIncludeSourceFiles(True)
settings.setCompatibility(RPKExportSettings.ARCGIS_PRO)
settings.setFile(ce.toFSPath("/general/data/rpk/rpkassets_simple_01.rpk"))
ce.exportRPK(settings)

 

此处定义的方法如下:

addFile

addFile(self, workspacePath):

Adds a workspace file or folder to the RPK.

@param workspacePath: The workspace file or folder to add or null to show a file dialog.  [str]

getAddFilesAutomatically

getAddFilesAutomatically(self):

If set to true files will be added automatically from parsing the source CGA or CGB.

@return: True if files are included automatically. [True/False]

getCompatibility

getCompatibility(self):

Gets the compatiblity of the generated RPK.

@return: result. [str]

getFile

getFile(self):

Gets File field. Target RPK file.

@return: Value of File field.  [str]

getIncludeSourceFiles

getIncludeSourceFiles(self):

Controls the inclusion of CGA files in the RPK.

@return: True if CGA files are included, False if they are excluded. [True/False]

getRuleFile

getRuleFile(self):

Gets RuleFile field. CGA or CGB source file.

@return: Value of RuleFile field.  [str]

listFiles

listFiles(self):

Lists the files that will be added to the RPK.

@return: result. [sequence of str]

setAddFilesAutomatically

setAddFilesAutomatically(self, addFiles = True):

Adds files automatically from parsing the source CGA or CGB.

@param addFiles: True to include files automatically, False to exclude them. (default  = True). [True/False]

setCompatibility

setCompatibility(self, compatibility):

Sets the compatiblity of the generated RPK.

@param compatibility: String which defines the RPK compatiblity. Default is DEFAULT.  ["DEFAULT", "ARCGIS_PRO"]. [str]

setFile

setFile(self, stringValue):

Sets File field. Target RPK file.

@param stringValue: the new value. [str]

setIncludeSourceFiles

setIncludeSourceFiles(self, includeSrc):

Controls the inclusion of CGA files in the RPK.

@param includeSrc: True to include CGA files, False to exclude them.  [True/False]

setRuleFile

setRuleFile(self, stringValue):

Sets RuleFile field. CGA or CGB source file.

@param stringValue: the new value. [str]

常量

此类用于定义以下常量:

ARCGIS_PRO = 'ARCGIS_PRO'
DEFAULT = 'DEFAULT'