Я использую API автоматизации проектирования Forge для перевода файлов Revit в IF C. В некоторых (важно: не во всех) файлах Revit я сталкиваюсь со следующей проблемой:
model-extractor_1 | [02/25/2020 10:50:58] Running in unattended mode.
model-extractor_1 | [02/25/2020 10:50:58] ====== Revit is running: revitcoreconsole ======
model-extractor_1 | [02/25/2020 10:50:58] Current Exe path: T:\Aces\AcesRoot\19.0\coreEngine\Exe\revitcoreconsole.exe
model-extractor_1 | [02/25/2020 10:50:58] Echoing command line args:
model-extractor_1 | [02/25/2020 10:50:58] 0:/i
model-extractor_1 | [02/25/2020 10:50:58] 1:T:\Aces\Jobs\16c21feb781e44539b20f0b32384730c\5e54fbc67a40b70023fb77a7.rvt
model-extractor_1 | [02/25/2020 10:50:58] 2:/al
model-extractor_1 | [02/25/2020 10:50:58] 3:T:\Aces\Applications\04530640f3854e51106296c1bad8c4d8.RvtPreprocess.RvtPreprocess5[1].package
model-extractor_1 | [02/25/2020 10:50:58] 4:/isolate
model-extractor_1 | [02/25/2020 10:50:58] 5:HKEY_CURRENT_USER\SOFTWARE\AppDataLow\Software\Autodesk\CoreUser\WorkItem_16c21feb781e44539b20f0b32384730c
model-extractor_1 | [02/25/2020 10:50:58] 6:T:\Aces\Jobs\16c21feb781e44539b20f0b32384730c\userdata
model-extractor_1 | [02/25/2020 10:50:58] Running RevitAssemblyResolver....
model-extractor_1 | [02/25/2020 10:50:58] Initializing RevitCoreEngine...
model-extractor_1 | [02/25/2020 10:50:58] Selected Revit\RCE install Path: (from app.config) C:\Revit2019
model-extractor_1 | [02/25/2020 10:50:58] Resolving location of Revit/RevitCoreEngine installation...
model-extractor_1 | [02/25/2020 10:50:58] Running user application....
model-extractor_1 | [02/25/2020 10:51:01] Found an addIn for registration: RvtPreprocess.addin
model-extractor_1 | [02/25/2020 10:51:01] Initializing RCE....
model-extractor_1 | [02/25/2020 10:51:01] Initializing RevitCoreEngine (and possibly running stub installer)...
model-extractor_1 | [02/25/2020 10:51:01] Language not specified, using English as default
model-extractor_1 | [02/25/2020 10:51:02] Initialize and get RCE: (VersionBuild) 19.0.0.0 (VersionNumber) 2019 (SubVersionNumber) 2019.2
model-extractor_1 | [02/25/2020 10:52:58] Finished running. Process will return: Success
model-extractor_1 | [02/25/2020 10:52:58] ====== Revit finished running: revitcoreconsole ======
model-extractor_1 | [02/25/2020 10:53:00] End Revit Core Engine standard output dump.
model-extractor_1 | [02/25/2020 10:53:00] End script phase.
model-extractor_1 | [02/25/2020 10:53:00] Start upload phase.
model-extractor_1 | [02/25/2020 10:53:00] Error: Non-optional output [result.ifc] is missing .
model-extractor_1 | [02/25/2020 10:53:00] Error: An unexpected error happened during phase Publishing of job.
model-extractor_1 | [02/25/2020 10:53:00] Job finished with result FailedMissingOutput
model-extractor_1 | [02/25/2020 10:53:00] Job Status:
Это странно, поскольку я обязательно готовлю URL для загрузки. Это становится очевидным, поскольку некоторые файлы успешно выполняются.
Мой workItem
поток / код выглядит примерно так:
const downloadUrl = (await this.dataManagementClient.createSignedUrl(this.params.forgeBucket, shortName)).signedUrl;
const uploadUrl = (await this.dataManagementClient.createSignedUrl(this.params.forgeBucket, uuid4(), 'readwrite')).signedUrl;
const workItem = await this.designAutomationClient.createWorkItem(
'RvtPreprocess.RvtPreprocessActivity5+test',
{
rvtFile: {
url: downloadUrl,
pathInZip: shortName,
},
result: {
verb: "put",
url: uploadUrl
}
}
)
Любые подсказки?
Редактировать:
Журналы с информацией о работе:
model-extractor_1 | [02/25/2020 11:14:52] Job information:
model-extractor_1 | "CommandLine":[
model-extractor_1 | "$(engine.path)\\\\revitcoreconsole.exe /i $(args[rvtFile].path) /al $(appbundles[RvtPreprocess5].path)"
model-extractor_1 | ]
model-extractor_1 | "Settings":{
model-extractor_1 | "dasreportfailedlimits": {
model-extractor_1 | "value": "true",
model-extractor_1 | "isEnvironmentVariable": true
model-extractor_1 | }
model-extractor_1 | }
model-extractor_1 | "Id":"b028fe12c5b943d48356a5738f743153"
model-extractor_1 | "ActivityId":"RvtPreprocess.RvtPreprocessActivity5+test"
model-extractor_1 | "Engine.Id":"Autodesk.Revit!29"
model-extractor_1 | "Apps": [
model-extractor_1 | "App.Id":"RvtPreprocess.RvtPreprocess5!1"
model-extractor_1 | ]
model-extractor_1 | "BoundArguments":{
model-extractor_1 | "rvtFile": {
model-extractor_1 | "localName": "$(rvtFile)",
model-extractor_1 | "pathInZip": "5e5501747a40b70023fb77a9.rvt",
model-extractor_1 | "url": "https://developer.api.autodesk.com/Masked:+A9horix/Nh5wX8c2fmP0d+60CE="
model-extractor_1 | },
model-extractor_1 | "result": {
model-extractor_1 | "localName": "result.ifc",
model-extractor_1 | "url": "https://developer.api.autodesk.com/Masked:4bpSamXnp/wNDyhX7oGp+5oCMo4=",
model-extractor_1 | "verb": "put"
model-extractor_1 | },
model-extractor_1 | "onProgress": {
model-extractor_1 | "ondemand": true,
model-extractor_1 | "url": "https://wlnr5sjl3a.execute-api.us-east-1.amazonaws.com/Masked:UK/Z3b5X3xUWxXiH6C9r9i9UlRU=",
model-extractor_1 | "headers": {
model-extractor_1 | "Content-Type": "application/json",
model-extractor_1 | "x-das-authorize": "awssigv4(us-east-1)",
model-extractor_1 | "x-ads-token-data": "{\"access_token\":{\"client_id\":\"TqUUZ0ZZFm3cK8BU8ROHdX4gt99mzkUl\"},\"scope\":\"code:all\",\"expires_in\":3599,\"client_id\":\"TqUUZ0ZZFm3cK8BU8ROHdX4gt99mzkUl\"}"
model-extractor_1 | },
model-extractor_1 | "verb": "put"
model-extractor_1 | }
model-extractor_1 | }
model-extractor_1 | "Quotas":{
model-extractor_1 | "limitDownloads": 200,
model-extractor_1 | "limitUploads": 200,
model-extractor_1 | "limitDownloadSizeMB": 2000,
model-extractor_1 | "limitUploadSizeMB": 2000,
model-extractor_1 | "limitProcessingTimeSec": 10800,
model-extractor_1 | "limitTotalUncompressedAppsSizeInMB": 5000
model-extractor_1 | }
Редактировать 2:
Вот пример рабочего перевода. Точно такой же поток / код; другой файл Revit:
[02/25/2020 11:58:12] ====== Revit is running: revitcoreconsole ======
[02/25/2020 11:58:12] Current Exe path: T:\Aces\AcesRoot\19.0\coreEngine\Exe\revitcoreconsole.exe
[02/25/2020 11:58:12] Echoing command line args:
[02/25/2020 11:58:12] 0:/i
[02/25/2020 11:58:12] 1:T:\Aces\Jobs\1631ee152e2248409f5ef6e0299e968a\5e550bc17a40b70023fb77ab.rvt
[02/25/2020 11:58:12] 2:/al
[02/25/2020 11:58:12] 3:T:\Aces\Applications\04530640f3854e51106296c1bad8c4d8.RvtPreprocess.RvtPreprocess5[1].package
[02/25/2020 11:58:12] 4:/isolate
[02/25/2020 11:58:12] 5:HKEY_CURRENT_USER\SOFTWARE\AppDataLow\Software\Autodesk\CoreUser\WorkItem_1631ee152e2248409f5ef6e0299e968a
[02/25/2020 11:58:12] 6:T:\Aces\Jobs\1631ee152e2248409f5ef6e0299e968a\userdata
[02/25/2020 11:58:12] Running RevitAssemblyResolver....
[02/25/2020 11:58:12] Initializing RevitCoreEngine...
[02/25/2020 11:58:12] Selected Revit\RCE install Path: (from app.config) C:\Revit2019
[02/25/2020 11:58:12] Resolving location of Revit/RevitCoreEngine installation...
[02/25/2020 11:58:12] Running user application....
[02/25/2020 11:58:16] Found an addIn for registration: RvtPreprocess.addin
[02/25/2020 11:58:16] Initializing RCE....
[02/25/2020 11:58:16] Initializing RevitCoreEngine (and possibly running stub installer)...
[02/25/2020 11:58:16] Language not specified, using English as default
[02/25/2020 11:58:17] Initialize and get RCE: (VersionBuild) 19.0.0.0 (VersionNumber) 2019 (SubVersionNumber) 2019.2
[02/25/2020 11:58:29] Finished running. Process will return: Success
[02/25/2020 11:58:29] ====== Revit finished running: revitcoreconsole ======
[02/25/2020 11:58:29] QWaitCondition: Destroyed while threads are still waiting
[02/25/2020 11:58:30] End Revit Core Engine standard output dump.
[02/25/2020 11:58:30] End script phase.
[02/25/2020 11:58:30] Start upload phase.
[02/25/2020 11:58:30] Uploading T:\Aces\Jobs\1631ee152e2248409f5ef6e0299e968a\result.ifc to https://developer.api.autodesk.com/oss/v2/signedresources/39644f58-8268-49ea-a945-5e8683592ebb?region=US.
[02/25/2020 11:58:30] End upload phase.
[02/25/2020 11:58:30] Job finished with result Succeeded
[02/25/2020 11:58:30] Job Status:
Редактировать 3:
Вот фрагмент кода из скрипта, который записывает в файл:
public static void ExportFunc(DesignAutomationData data){
//some code
var path_dir = Path.GetDirectoryName(data.FilePath);
doc.Export(path_dir, "result.ifc", opt);
}
Похоже, это основа c достаточно, чтобы работать согласованно, независимо от содержимого файла.
Может ли быть, что этот процесс является ложным срабатыванием без вывода сообщений, в результате чего файл не будет загружен без ведома Revit?