Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Save IDW to DWG with iLogic on Forge

0 REPLIES 0
Reply
Message 1 of 1
f.zafferi
296 Views, 0 Replies

Save IDW to DWG with iLogic on Forge

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 REPLIES 0

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report