使用模型狀態修改複本參數的解決方案
新增功能: 2022
一個組合可以包含相同零件 (或次組合) 的 2 個或更多個例證,其中的相同零件 (或次組合) 處於 2 種不同的模型狀態。如果您將處於不同模型狀態的相同零件 (或次組合) 做為元件例證,其中一個或多個例證可能無法修改。如果您修改一個構件 (處於一種模型狀態),則表示另一個構件 (處於不同模型狀態) 無法修改。但是,您可以更新組合本身來使其可修改。以下是一個範例:
InventorVb.DocumentUpdate() Parameter("Part1:1", "Length") = 1 Parameter("Part1:1", "Width") = 0.5 ' The parameter assignments above modify the member document of the first occurrence, which makes the member document of the second occurrence not modifiable. ' To make it modifiable, update this assembly document: InventorVb.DocumentUpdate() ' Now we can modify the other model state: Parameter("Part1:2", "Length") = 2 Parameter("Part1:2", "Width") = 1.5
做為最佳實踐,請先在相同零件 (或次組合) 的第一個例證中進行需要的所有變更,然後再更新和變更相同零件 (或次組合) 的第二個例證。