Save IDW to DWG with iLogic on Forge

Save IDW to DWG with iLogic on Forge

f.zafferi
Explorer Explorer
335 Views
0 Replies
Message 1 of 1

Save IDW to DWG with iLogic on Forge

f.zafferi
Explorer
Explorer

Hello, i'm trying to convert .idw files to .dwg within an assembly .iam.

 

This is my file structure 

 

- Cubo.iam

- Cubo Parts (folder)

   - Fondo.idw

   - Fondo.ipt

   - Piede.idw

   - Piede.ipt

 

Inside Cubo.iam i created this iLogic script 

FilesToConvert = New String() {"Fondo", "Piede"}

For Each FileToConvert In FilesToConvert
	FullFilename = ThisDoc.Path & "\Cubo Parts\" & FileToConvert & ".idw"
	Dim oDoc As DrawingDocument = ThisServer.Documents.Open(FullFilename, False)
	oDoc.SaveAsInventorDWG(ThisDoc.Path & "\Cubo Parts\" & FileToConvert & ".dwg", True)
Next

I linked it with the trigger Property Change. When i change a parameter of the assembly on inventor all the dwgs are created perfectly.

 

But when i run the AddIn UpdateParametersPlugin from this tutorial it return this error

[11/16/2021 16:37:15]     InventorCoreConsole.exe Information: 0 : Performing iLogic diagnostics...
[11/16/2021 16:37:15]     InventorCoreConsole.exe Error: 0 : iLogic error 
[11/16/2021 16:37:15]  Context: RuleRunning 
[11/16/2021 16:37:15]  Details: System.NullReferenceException: Object reference not set to an instance of an object.
[11/16/2021 16:37:15]    at ThisRule.Main()
[11/16/2021 16:37:15]    at Autodesk.iLogic.Exec.AppDomExec.ExecRuleInAssembly(Assembly assem)
[11/16/2021 16:37:15]    at iLogic.RuleEvalContainer.ExecRuleEval(String execRule)
[11/16/2021 16:37:15]     InventorCoreConsole.exe Error: 0 : iLogic error 
[11/16/2021 16:37:15]  Context: RuleRunning 
[11/16/2021 16:37:15]  Details: System.NullReferenceException: Object reference not set to an instance of an object.
[11/16/2021 16:37:15]    at ThisRule.Main()
[11/16/2021 16:37:15]    at Autodesk.iLogic.Exec.AppDomExec.ExecRuleInAssembly(Assembly assem)
[11/16/2021 16:37:15]    at iLogic.RuleEvalContainer.ExecRuleEval(String execRule)
[11/16/2021 16:37:15]     InventorCoreConsole.exe Error: 0 : iLogic error 
[11/16/2021 16:37:15]  Context: RuleRunning 
[11/16/2021 16:37:15]  Details: System.NullReferenceException: Object reference not set to an instance of an object.
[11/16/2021 16:37:15]    at ThisRule.Main()
[11/16/2021 16:37:15]    at Autodesk.iLogic.Exec.AppDomExec.ExecRuleInAssembly(Assembly assem)
[11/16/2021 16:37:15]    at iLogic.RuleEvalContainer.ExecRuleEval(String execRule)
[11/16/2021 16:37:15]     InventorCoreConsole.exe Error: 0 : iLogic error 
[11/16/2021 16:37:15]  Context: RuleRunning 
[11/16/2021 16:37:15]  Details: System.NullReferenceException: Object reference not set to an instance of an object.
[11/16/2021 16:37:15]    at ThisRule.Main()
[11/16/2021 16:37:15]    at Autodesk.iLogic.Exec.AppDomExec.ExecRuleInAssembly(Assembly assem)
[11/16/2021 16:37:15]    at iLogic.RuleEvalContainer.ExecRuleEval(String execRule)
[11/16/2021 16:37:15]     InventorCoreConsole.exe Information: 0 : End of iLogic diagnostics...

 

The plugin works fine if i disable the iLogic script

0 Likes
336 Views
0 Replies
Replies (0)