Following our Open by Design philosophy, Siemens PLM Software provides NX Automation APIs called NX Open API . NX Open API spans major industry-standard automation languages such as JAVA, .NET and C++ (the traditional C API is supported as well).
You can create, access, and manipulate Knowledge Fusion rules through NX automation programs by using the Rule Manager class and its corresponding methods.
Siemens PLM Software provides the Rule Manager class in all NX Open APIs (JAVA, .NET and C++). You can instantiate an object of this class as per standards of the given automation language and use its methods to access and manipulate Knowledge Fusion rules. For example, the following code fragments show how to delete a rule named test_block from the work part through an NX Open application using the Rule Manager:
|
Automation Language |
Rule Manager Instantiation |
||
|---|---|---|---|
|
........
theSession =
(Session) SessionFactory.get();
Part WorkPart =
theSession.part().work();
RuleManager rm =
workPart.ruleManager();
rm.deleteChildRule("test_block");
........ |
||
|
........
Dim theSession As Session =
Session.GetSession()
Dim workPart As Part =
theSession.Parts.Work
Dim rm As RuleManager =
workPart.RuleManager
rm.DeleteChildRule("test_block")
........ |
||
|
........
Session *theSession =
Session::GetSession();
Part *workPart(theSession->
Parts()->Work());
RuleManager *rm =
workPart->RuleManager();
rm->DeleteChildRule("test_block");
........ |