Message 1 of 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi forum,
I made a VB.NET code for Inventor last week (with help from forum members), which runs fine by the way!
I tried translating it to C# but i cant solve the errors i am getting, since im new to coding i find it diffecult to interpret the error messages.
If anyone can help me out it's greatly appreciated
.
Below here is a part the code in C#, below that the error messages, its about CS1955 and CS1061
using System;
using System.Windows.Forms;
using System.Runtime.InteropServices;
using Inventor;
using System.ComponentModel.Design.Serialization;
using Autodesk.iLogic.Interfaces;
public void rulerunner()
{
{
string MyRuleName = "cmdRead";
string iLogicAddinGuid = "{3BDD8D79-2179-4B11-8A5A-257B1C0263AC}";
ApplicationAddIn iLogicAddin;
object iLogicAutomation = null; // As IiLogicAutomation = Nothing
try
{
iLogicAddin = _invApp.ApplicationAddIns.ItemById(iLogicAddinGuid); //doesnt work?
iLogicAutomation = iLogicAddin.Automation;
}
catch (Exception ex)
{
MessageBox.Show("Unable to access iLogic addin " + ex.Message);
}
try
{
iLogicAutomation.RunRule(oDoc, MyRuleName); //doesntwork?
}
catch
{
MessageBox.Show("There is no rule called " + MyRuleName);
}
}
}
Solved! Go to Solution.