Open iLogic form from API

Open iLogic form from API

Anonymous
Not applicable
953 Views
2 Replies
Message 1 of 3

Open iLogic form from API

Anonymous
Not applicable

Hi,

 

I've done an Addin which contains a "Place iLogic Component" function. This funcion work properly and the iLogic form is opened at place component time. Now, i would like to be able to open the form after the insertion, for edition purpose. So, i'd like to open the iLogic form of an assembly component (occurence) with the context menu for example.

 

So, my question is : Is there a way to check if a part or an assembly contain an iLogic form and to open it through Inventor 2012 API ?

 

Thanks in advance for your help,

 

Colin

0 Likes
954 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable

I think It may help you

 

 

 

foreach (Autodesk.iLogic.Interfaces.iLogicRule eachRule in_iLogicAutomation.get_Rules(oCurrentDoc))
        {
            if (eachRule.Name == "MyRule")
            {
                myRule = eachRule;
                //list the code of rule to the list box
                MessageBox.Show( myRule.Text);
                break;
            }
        }
        if (myRule != null)
            _iLogicAutomation.RunRule(oCurrentDoc, "MyRule");
    }
}

 

0 Likes
Message 3 of 3

Anonymous
Not applicable
Hi,



Thanks for the tip ! I'll try that as soon as possible !
0 Likes