工程圖 (Drawings)
工程圖是用來顯示零件與 CAD 文件之 CAD 工程圖清單的「項目清單」元件的預先定義組態。工程圖與「項目清單」具有類似的搜尋、排序、篩選及還原預設值功能。針對每個工程圖,「工程圖」都會顯示您可以透過組態來選擇的屬性。預設屬性包括「名稱」、「格式」、「版本」與「上次修改時間」,其中「名稱」與「格式」是工程圖的自訂屬性。「名稱」包含用於下載工程圖的連結,而「格式」則包含其他可用下載格式的下拉選單。
以下是顯示「工程圖」預先定義組態的兩個範例圖像:
「檢視工程圖」任務中工程圖元件的螢幕快照
「檢視工程圖」任務中顯示已展開可用格式下拉選單之工程圖元件的螢幕快照
繫結內容 
如需有關繫結「工程圖」的資訊,請參閱項目清單元件。
* 
針對「工程圖」,輸入繫結內容支援 PTC.CADDocumentMgmt.CADDocumentPTC.ProdMgmt.Part 物件類型。
selectedItems 繫結內容的輸出包含具有 PTC.CADDocumentMgmt.CADDocument 物件類型的項目。
組態內容 
如需有關配置「工程圖」的資訊,請參閱項目清單元件。此外,下列 JSON 內容為「工程圖」所特有。
如需有關組態結構的詳細資訊,請參閱元件組態結構
如需有關子內容的詳細資訊,請參閱子內容與容器金鑰
內容名稱
描述
內容類型
預設值
必要或選用
drawingOptions
決定擷取的檔案類型。選項:
allFiles - 擷取零件或 CAD 文件的所有工程圖檔案
lastModifiedFileOnly - 僅擷取零件或 CAD 文件的最新修改工程圖檔案
此組態內容放置在元件組態中的 implementationConfiguration 內容下。
allFiles
必要
drawingFormats
決定將擷取並顯示在「格式」欄下拉選單中的檔案格式。選項:
specifiedFormatsOnly - 僅擷取指定的檔案格式;使用 specifiedFormatsDefinition 內容來指定要包括的檔案格式。檔案格式以其在 specifiedFormatsDefinition 內容中列出的相同順序顯示在下拉選單中。
allAvailableFormats - 擷取所有可用檔案格式。如果有適用工程圖的 PDF 格式,「名稱」欄會包含下載 PDF 的連結,且 PDF 將是下拉選單中列出的第一種格式。
* 
如果只有一種檔案格式可用於工程圖,該格式會顯示在「名稱」欄下。該工程圖的「格式」欄將為空白。
此組態內容放置在元件組態中的 implementationConfiguration 內容下。
specifiedFormatsOnly
必要
specifiedFormatsDefinition
要擷取之指定格式的清單。格式應以空格分隔。此處列出的格式順序指示這些格式在「格式」欄下拉選單中的顯示順序。
這是 getDrawingFormats 的子內容,且僅在將 getDrawingFormats 設定為 specifiedFormatsOnly 時相關。其容器金鑰為 implementationConfiguration
PDF DXF PLT CGM
必要
attributes
如需詳細資訊,請參閱項目清單
接受 PTC.CADDocumentMgmt.CADDocument 物件類型的屬性。
此外,還會接受具有 PTC.CADDocumentMgmt.CADDocument.Custom.Implementation 物件類型的 NameFormats 屬性。
N/A
必要
defaultSortField
如需詳細資訊,請參閱項目清單
接受 PTC.CADDocumentMgmt.CADDocumentPTC.CADDocumentMgmt.CADDocument.Custom.Implementation 物件類型的屬性。
N/A
選用
showImplementationActions
當此內容包括 downloadZip 金鑰時,「工程圖」會在內嵌「動作列」中包括全部下載按鈕。這可讓使用者下載所有工程圖。
downloadZip 是「工程圖」針對此內容支援的唯一值。
N/A
選用
範例組態 
{
"showImplementationActions":{
"selected":[
{
"key":"downloadZip"
}
]
},
"selectionType":{
"selectedKey":"none"
},
"waitForInput":{
"value":true
},
"implementationConfiguration":{
"inTailoring":true,
"value":{
"drawingOptions":{
"selectedKey":"allFiles"
},
"drawingFormats":{
"selectedKey":"specifiedFormatsOnly",
"additionalData":{
"specifiedFormatsDefinition":{
"specifiedFormats":{
"value":"PDF DXF PLT CGM"
}
}
}
}
}
},
"baseConfigurationVersion":{
"value":"nav.3"
},
"implementationConfigurationVersion":{
"value":"nav.2"
},
"defaultSortFields":{
"selectedValues":{
"data":[
{
"itemListsData":[
{
"items":[
{
"additionalData":{
"itemListDefaultSortFieldDefinition":{
"defaultSortDirection":{
"selectedKey":"asc"
}
}
},
"id":"Name"
}
],
"objectType":"PTC.CADDocumentMgmt.CADDocument.Custom.Implementation"
}
],
"adapter":{
"instanceName":"windchill",
"thingName":"PTC.WCAdapter"
}
}
]
}
},
"attributes":{
"selectedValues":{
"data":[
{
"itemListsData":[
{
"items":[
{
"id":"Version",
"ordinal":2
},
{
"id":"LastModified",
"ordinal":3
}
],
"objectType":"PTC.CADDocumentMgmt.CADDocument"
},
{
"items":[
{
"id":"Name",
"ordinal":0
},
{
"id":"Formats",
"ordinal":1
}
],
"objectType":"PTC.CADDocumentMgmt.CADDocument.Custom.Implementation"
}
],
"adapter":{
"instanceName":"windchill",
"thingName":"PTC.WCAdapter"
}
}
]
}
},
"label":{
"value":""
},
"showExportAction":{
"value":false
},
"enableSearch":{
"additionalData":{
"itemListSearchDefinition":{
"searchHintText":{
"value":"[[PTC.Nav.Drawings.FindDrawing]]"
}
}
},
"value":true
}
}
自訂服務 
除組態以外,每個元件還支援延伸其企業邏輯以自訂元件。每個元件的企業邏輯包括物範本中可以進行延伸與取代的置換服務。此元件的置換服務會在下表中詳細說明:
如需每個服務的傳回結果與參數範例,請參閱自訂服務的輸入/輸出範例
名稱
描述
GetConfigurations
傳回「工程圖」的可用組態。
參數:
傳回:JSON
GetImplementationSettings
傳回設定資料,其中包含適用於「下載全部」按鈕的資料。此資料由「工程圖」實行在內部使用。
參數:
傳回:JSON
GetItems
傳回來自後端系統的工程圖清單及其屬性與值。
參數:
input (必要) - CCO 格式的 JSON,其中包括要從後端系統擷取之資料的輸入 ID,以及後端系統的轉接器資訊。
configuration (必要) - 包含從「調整管理員」資源取得之最終合併組態的 JSON。
傳回:CCO 格式的 JSON
DefHookGetImplementationActionsList
傳回列在 GetImplementationSettings 服務中 implementationActions 金鑰下的動作。
參數:
傳回:JSON:Array
DefHookImplementationConfigurationDefinitionGroup
傳回具有可用自訂組態的「工程圖」實行定義。包括 getDrawingOptionsgetDrawingFormats 組態內容的定義。
參數:
傳回:JSON:Array
實行定義 
{
"array":[
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{
"directDefinition":[
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{

}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.Textbox"
},
"mandatory":false,
"key":"actionBarConfigurationJSON"
}
]
}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.DefinitionGroup"
},
"mandatory":false,
"key":"actionBarConfiguration"
},
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{
"additionalDefinition":[
{
"directDefinition":[
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{

}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.Textbox"
},
"mandatory":false,
"key":"fieldTitleOverride"
}
],
"key":"itemListAttributesDefinition"
},
{
"directDefinition":[

],
"key":"implementationAttributesDefinition"
}
],
"updateServiceName":"",
"minimumSelectedAttributes":null,
"supportedTypes":{
"data":[

],
"allowSubsetForTailoring":false
},
"addServiceName":"",
"maximumSelectedAttributes":null
}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.AttributesSelector"
},
"mandatory":true,
"key":"attributes"
},
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{
"options":[
{
"label":"1",
"key":"1"
},
{
"label":"2",
"key":"2"
},
{
"label":"3",
"key":"3"
},
{
"label":"4",
"key":"4"
},
{
"label":"5",
"key":"5"
},
{
"label":"6",
"key":"6"
},
{
"label":"7",
"key":"7"
},
{
"label":"8",
"key":"8"
},
{
"label":"9",
"key":"9"
},
{
"label":"-1",
"key":"-1"
}
],
"updateServiceName":null,
"addServiceName":null
}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.Dropdown"
},
"mandatory":false,
"key":"defaultExpansionLevel"
},
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{
"additionalDefinition":[
{
"directDefinition":[
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{
"options":[
{
"description":"Sort column in ascending order",
"label":"[[PTC.Nav.ItemList.SortOrder.Asc]]",
"key":"asc"
},
{
"description":"Sort column in descending order",
"label":"[[PTC.Nav.ItemList.SortOrder.Dsc]]",
"key":"dsc"
}
],
"updateServiceName":null,
"addServiceName":null
}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.RadioButton"
},
"mandatory":false,
"key":"defaultSortDirection"
}
],
"key":"itemListDefaultSortFieldDefinition"
}
],
"updateServiceName":"",
"minimumSelectedAttributes":null,
"supportedTypes":{
"data":[

],
"allowSubsetForTailoring":false
},
"addServiceName":"",
"maximumSelectedAttributes":null
}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.AttributesSelector"
},
"mandatory":false,
"key":"defaultSortFields"
},
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{
"default":true,
"true":{
"additionalDefinition":[
{
"directDefinition":[
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{

}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.Textbox"
},
"mandatory":false,
"key":"searchHintText"
}
],
"key":"itemListSearchDefinition"
}
],
"label":"[[PTC.Nav.Yes]]"
},
"false":{
"additionalDefinition":[

],
"label":"[[PTC.Nav.No]]"
}
}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.Toggle"
},
"mandatory":false,
"key":"enableSearch"
},
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{
"additionalDefinition":[
{
"directDefinition":[
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{
"dynamicallySetTypeServiceName":"GetFilterTypeDefinitionForFilterField",
"type":{
"enum":{
"options":[

],
"updateServiceName":null,
"dynamicallySetOptionsServiceName":null,
"addServiceName":null,
"multiSelect":null
}
}
}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.FieldFilter"
},
"mandatory":false,
"key":"defaultSelectedFilterValues"
},
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{

}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.Textbox"
},
"mandatory":false,
"key":"filterLabelOverride"
}
],
"key":"itemListFilterFieldDefinition"
}
],
"updateServiceName":"",
"minimumSelectedAttributes":0,
"supportedTypes":{
"data":[

],
"allowSubsetForTailoring":false
},
"addServiceName":"",
"maximumSelectedAttributes":1
}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.AttributesSelector"
},
"mandatory":false,
"key":"filterFields"
},
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{
"directDefinition":[
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{
"options":[

],
"updateServiceName":null,
"addServiceName":null
}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.RadioButton"
},
"mandatory":false,
"key":"drawingFormats"
},
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{
"options":[

],
"updateServiceName":null,
"addServiceName":null
}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.RadioButton"
},
"mandatory":false,
"key":"drawingOptions"
}
]
}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.DefinitionGroup"
},
"mandatory":false,
"key":"implementationConfiguration"
},
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{

}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.Textbox"
},
"mandatory":false,
"key":"label"
},
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{
"minValue":50,
"default":500,
"maxValue":10000,
"step":50
}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.Number"
},
"mandatory":false,
"key":"maxNumberOfRowsInGrid"
},
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{
"options":[
{
"description":"Disallow items selection",
"label":"[[PTC.Nav.ItemList.SelectionType.None]]",
"key":"none"
},
{
"description":"Allow single item selection",
"label":"[[PTC.Nav.ItemList.SelectionType.Single]]",
"key":"single"
},
{
"description":"Allow multiple items selection",
"label":"[[PTC.Nav.ItemList.SelectionType.Multiple]]",
"key":"multi"
}
],
"updateServiceName":null,
"addServiceName":null
}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.RadioButton"
},
"mandatory":false,
"key":"selectionType"
},
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{
"default":true,
"true":{
"additionalDefinition":[
{
"directDefinition":[
{
"property":{
"options":[
[
{
"label":"[[PTC.Nav.ItemList.ExportCSVActionLabel]]",
"key":"exportToCsv"
},
{
"label":"[[PTC.Nav.ItemList.ExportCSVAsExcelActionLabel]]",
"key":"exportToExcel"
}
]
]
},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{
"default":"",
"overflow":null,
"minimumSelectedItems":null,
"options":[

],
"updateServiceName":null,
"addServiceName":null,
"constraints":{

}
}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.CheckboxArray"
},
"mandatory":false,
"key":"exportTypes"
},
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{
"default":false,
"true":{
"additionalDefinition":[

],
"label":null
},
"false":{
"additionalDefinition":[

],
"label":null
}
}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.Toggle"
},
"mandatory":false,
"key":"exportUnFilteredData"
}
],
"key":"itemListExportDefinition"
}
],
"label":"[[PTC.Nav.Yes]]"
},
"false":{
"additionalDefinition":[

],
"label":"[[PTC.Nav.No]]"
}
}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.Toggle"
},
"mandatory":false,
"key":"showExportAction"
},
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{
"listLabel":null,
"showFilter":false,
"minimumSelectedItems":0,
"showDropDown":false,
"options":[
{
"label":"[[PTC.Nav.Drawings.DownloadAll]]",
"key":"downloadZip"
}
],
"updateServiceName":null,
"addServiceName":null,
"showClearSelectedItems":false,
"dropDownLabel":null
}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.List"
},
"mandatory":false,
"key":"showImplementationActions"
},
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{
"default":false,
"true":{
"additionalDefinition":[

],
"label":"[[PTC.Nav.Yes]]"
},
"false":{
"additionalDefinition":[

],
"label":"[[PTC.Nav.No]]"
}
}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.Toggle"
},
"mandatory":false,
"key":"waitForInput"
}
]
}
這是否有幫助?