Message 1 of 8
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi, guys,
I have a problem with an iLogic rule running on Forge Design Automation service. It works locally, but fails in the cloud.
This is a part of an addin, it is very simple:
public void Run(Document doc)
{
...
var document = inventorApplication.Documents.Open(path);
var drawingDocument = (DrawingDocument)document;
// set some parameter values
drawingDocument.Parameters...
...
iLogicAuto.RunRule(document , "Update");
...
}
This is a part of iLogic rule code:
...
System.IO.File.AppendAllText(logFilePath, "Started;")
Try
Dim oDoc As Document
oDoc = ThisApplication.ActiveDocument
System.IO.File.AppendAllText(logFilePath, "got the document;")
...
Catch ex As Exception
System.IO.File.AppendAllText(logFilePath, ex.Message)
End Try
And my iLogic rule log file content after executing the WorkItem is:
Started;Object reference not set to an instance of an object.
So ThisApplication was null. What should I change to be able to run this code in the cloud? It works locally...
Solved! Go to Solution.