1. Connector 参数
1.1. Snapshot
The --fwk--snapshot parameter tells iModelBridgeFwk.exe to create a snapshot instead of updating an iModel. (A "snapshot" is a local bim file that is not connected to an iModel in iModelHub.) In this mode, iModelBridgeFwk loads and calls functions on bridges in (almost) the same way that it does when updating iModels. It just omits the steps that involveinteracting with iModelHub, such as obtaining locks, retrying certain operations, andpushing changesets. This is how real users use iTwin Synchronizer to create snapshots out in the field right now.You can iModelBridgeFwk in this way, too. This is the best way to test your bridge, when you don't want to work with iModelHub.
Syntax:
iModelBridgeFwk.exe --fwk-snapshot=<snapshot name> --fwk-input=<input file name> --fwk-staging-dir=<output dir> --fwk-bridge-library=<path to bridge>
1.2. Job Environment
--fwk-bridge-library= (optional) The full path to the bridge library. Specify this instead of --fwk-bridge-regsubkey.
--fwk-bridge-regsubkey= (optional) The registry subkey of a bridge that is installed on this machine. Specify this instead of --fwk-bridge-library.
--fwk-staging-dir= (required) The staging directory.
--fwk-input= (required) Input file name. Specify only one.
--fwk-input-sheet= (required) Input sheet file name. Can be more than one.
--fwk-revision-comment= (optional) The revision comment. Can be more than one.
--fwk-logging-config-file= (optional) The name of the logging configuration file.
--fwk-argsJson= (optional) Additional arguments in JSON format.
--fwk-max-wait=milliseconds (optional) The maximum amount of time to wait for other instances of this job to finish. Default value is 60000ms
--fwk-assetsDir= (optional) Asset directory for the iModelBridgeFwk resources if default location is not suitable.
--fwk-bridgeAssetsDir= (optional) Asset directory for the iModelBridge resources if default location is not suitable.
--fwk-reality-data-dir= (optional) Path to where reality data tiles should be written to for upload to the Reality Data Server.
--fwk-job-subject-name= (optional) The unique name of the Job Subject element that the bridge must use.
--fwk-jobrun-guid= (optional) A unique GUID that identifies this job run for activity tracking. This will be passed along to all dependant services and logs.
--fwk-jobrequest-guid= (optional) A unique GUID that identifies this job run for correlation. This will be limited to the native callstack.
--fwk-ignore-stale-files (optional) Should bridges ignore any file whose last-saved-time is BEFORE that last-saved-time recorded for that file in the iModel?. The default is false (that is, process such files, looking for differences).
--fwk-error-on-stale-files (optional) Should bridges fail and report an error if they encounter a file whose last-saved-time is BEFORE that last-saved-time recorded for that file in the iModel?. The default is false (that is, don't fail on stale files).
--fwk-no-mergeDefinitions (optional) Do NOT merge definitions such as levels/layers and materials by name from different root models and bridges into the public dictionary model. Instead, keep definitions separate by job subject. The default is false (that is, merge definition).
--fwk-status-message-sink-url= (optional) The URL of a WebServer that will process progress meter and status messages
--fwk-status-message-interval= (optional) The number of milliseconds to wait before sending another status or progress meter message to the status message server. The default is 1000 milliseconds.
--fwk-enable-crash-reporting (optional) Opt-in to crash reporting and potential upload
--fwk-inputArgsJsonFile (optional) Input args serialized into a file stored as json
--fwk-skip-assignment-check (optional) Ignore the assignment check stored in the bridge settings.
--fwk-no-intermediate-pushes (optional) If set a single changeset is created per input file.
--fwk-snapshot= (optional) Create a standalone "snapshot" iModel file with the specified name in the specified staging directory. The file will not be associated with any iModel on any iModel server.
--fwk-unmap-input-file = (optional) Delete the input file from an imodel. This option works in conjunction with --fwk-input option.
--fwk-affinityMappingJsonFile= (optional) Affinity mapping generated by AffinityChecker exe containing the AuthoringProductStamp for file.
1.3. iModelBank
--imodel-bank-url= (required) The URL of the iModelBank server to use.
--imodel-bank-imodel-id= (required) The GUID of the iModel to use.
--imodel-bank-context-id= (required) The GUID of the context to use.
--imodel-bank-storage-type= (required) The type of storage iModelBank uses (azure, localhost).
--imodel-bank-access-token= (optional) The JSON-encoded user access token, if needed by the project mgmt system.
--imodel-bank-retries= (optional) The number of times to retry a pull, merge, and/or push to iModelBank. Must be a value between 0 and 255.
--imodel-bank-max-retry-wait= (optional) The maximum number of seconds to wait when retrying a pull, merge, and/or push to iModelBank (actual wait is randomized). Must be a value between 0 and 255.
--imodel-bank-dms-credentials-isEncrypted (optional) The DMS user name and password passed in is encrypted.
1.4. DMS
--dms-library= (optional) The full path to the dms library. eg. iModelDmsSupportB02.dll Use this for direct Dms support from the framework.
--dms-workspaceDir= (optional) Directory to cache workspace files.
--dms-user= (optional) The username for the dms source. Ignored if --dms-accessToken is specified.
--dms-password= (optional) The password for the dms source.
--dms-inputFileUrn= (optional) The urn to fetch the input file. This and associated workspace will be downloaded and stored in the location specified by --fwk-input and --dms-workspaceDir= eg.pw://server:datasource/Documents/D{c6cbe438-e200-4567-a98c-dfa55aba33be}
--dms-datasource= (optional) The datasource to fetch the files from. Explicit usage instead of URN
--dms-folderId= (optional) FolderId if inputFileUrn is not specified. Explicit usage instead of URN
--dms-documentId= (optional) DocumentId if inputFileUrn is not specified. Explicit usage instead of URN
--dms-appWorkspace= (optional) Reference application workspace if the default fallback is not usable.
--dms-retries= (optional) The number of times to retry
--dms-type= (optional) Supports the following values 1 ( PW (default)), 2 (PWShare), 3 (Azure SAS Url)
--dms-additionalFiles= (optional) Applicable only for PW. Supports staging files specified by the pattern. (eg *.xml ). Can be specified more than once.
--dms-documentGuid= (optional) Document identifier in the system. In case of PW this is obtained from inputFileUrn
--dms-accessToken=
(optional)
OIDC or SAML access token used to login to DMS system. If ommited or empty, user credentials are used for login
1.5. example
C:\Program Files\Bentley\iModelBridgeMstn\iModelBridgeFwk.exe @D:\1\iModelWeb\backend\data\jobs\7ddc079a-1478-4b60-afb6-7644c0d6c215\output\IModelBridgeForMstn\args.rs
--fwk-bridge-regsubkey=IModelBridgeForMstn
--fwk-staging-dir="D:\1\iModelWeb\backend\data\jobs\7ddc079a-1478-4b60-afb6-7644c0d6c215\output\IModelBridgeForMstn"
--fwk-input="D:\1\iModelWeb\backend\data\jobs\7ddc079a-1478-4b60-afb6-7644c0d6c215\input\files\mydgn.dgn"
--fwk-logging-config-file="D:\1\iModelWeb\backend\data\jobs\7ddc079a-1478-4b60-afb6-7644c0d6c215\logging.config.xml"
--DGN-Install=C:\Program Files\Bentley\MicroStation CONNECT Edition\MicroStation
--imodel-bank-imodel-id=7ddc079a-1478-4b60-afb6-7644c0d6c215
--imodel-bank-url=http://localhost:4000
--imodel-bank-context-id=89687eb8-51dd-4d65-9250-3ac8b919ef6a
--imodel-bank-storage-type=localhost
--imodel-bank-access-token="Basic dGVzdDp0ZXN0"