メッセージ1/9
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- パーマリンクを表示
- 印刷
- 報告
Hi everyone,
I wrote a code for read iproperties from part or assembly in folder. The code run:
1 - read all file in folder
2 - filter file in folder (.asm, .ipt)
3 - add component to assembly
4 - read iproperties
5 - delete component
All works very weel but the last phase give me the error:
I create many logger for control the code anche the code raw that give me a problem is:
Sub DeleteComponent()
Dim oAsmCompDef As AssemblyComponentDefinition = ThisApplication.ActiveDocument.ComponentDefinition
Dim oOcc As ComponentOccurrence
For Each oOcc In oAsmCompDef.Occurrences
If oOcc.DefinitionDocumentType = kAssemblyDocumentObject Then
Logger.Info("⃝⃝⃝⃝ [ Rimozione assieme " & oOcc.Name & " ]")
oOcc.Delete()
Logger.Info("⃝⃝⃝⃝ [ Fine rimozione dell'elemento " & oOcc.Name & " ]")
End If
Next
End Sub
oOcc.Delete()
I've already use this function in other code but now I've this problem.
How can i Solve it?
In attached the complete code.
Thanks
解決済! 解決策の投稿を見る。