Message 1 of 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I create a c# progra that i want to call a rule in my ipt part.
In my reference I add
Autodesk.iLogic.Interfaces
Autodesk.iLogic.Runtime
Autodesk.Inventor.Interop
I set the 3 referenes with Interop Types = false. and copy to output folder = true
this is my InventorApp code
using Autodesk.iLogic.Interfaces;
using Inventor;
namespace InventorHSA
{
public class PartDocument
{
Inventor.PartDocument _partDocument;
Inventor.Application _invApp { get
{
return _partDocument.Parent as Inventor.Application;
}
}
public string FullFileName
{
get { return _partDocument.FullFileName; }
}
public PartDocument(Inventor.PartDocument partDocument)
{
_partDocument = partDocument;
}
public void RuniLogicRule(string ruleName)
{
//iLogic is also an addin which has its guid
string iLogicAddinGuid = "{3BDD8D79-2179-4B11-8A5A-257B1C0263AC}";
Inventor.ApplicationAddIn addIn = _invApp.ApplicationAddIns.ItemById[iLogicAddinGuid];
var iLogicAuto = addIn.Automation;
Inventor.Document _doc = _partDocument as Inventor.Document;
IiLogicAutomation automation = iLogicAuto as IiLogicAutomation;
automation.RunRule(_doc,ruleName);
}
}
}
But when I compile I got the error "Problem on generate the manifest, there isn't possible load Autodesk.iLogic.Types.resourses.dll" or one of their dependencies
I simplify my code to this snipet,
My question is there is a other way to run a rule in my part document?
Solved! Go to Solution.