NX Open C++ Reference Guide
Classes | Public Types | Public Member Functions
NXOpen::RuleManager Class Reference

Provides methods for manipulating the Knowledge Fusion rules in a part. More...

List of all members.

Classes

struct  AdoptableTypes
 Used to return adoptable object types. More...
struct  DebugInstance
 Used to return debug update information for instances. More...
struct  DebugRule
 Used to return debug update information for rules. More...
struct  FunctionArgumentsInformation
 Used to return information about the arguments for a function. More...
struct  FunctionInformation
 Used to return information about a function. More...
struct  ParameterRule
 Used to specify parameter values for child rule creation or modification. More...

Public Types

enum  Filter {
  FilterUser, FilterSystem, FilterBoth, FilterUserPlus,
  FilterUserLoaded, FilterSystemLoaded, FilterBothLoaded, FilterUserPlusLoaded
}
 The filter option for asking for classes. More...
enum  InitializationStatusType {
  InitializationStatusTypeSuccess, InitializationStatusTypeFailure, InitializationStatusTypeUnavailable, InitializationStatusTypeUnableToObtainLicense,
  InitializationStatusTypeCloseFailure
}
 Indicates the status from initializing RuleManager. More...
enum  LicenseType {
  LicenseTypeNoLicense, LicenseTypeAuthor, LicenseTypeExecute, LicenseTypePipeline,
  LicenseTypeKfFeature, LicenseTypeKfInterop, LicenseTypeKfNewGeom, LicenseTypeKfChecking
}
 Indicates the license type to be used. More...
enum  RuleType {
  RuleTypeBoolean, RuleTypeFrame, RuleTypeInteger, RuleTypeList,
  RuleTypeName, RuleTypeNumber, RuleTypePoint, RuleTypeString,
  RuleTypeVector, RuleTypeInstance, RuleTypeAny, RuleTypeHostPointer
}
 Indicates the data type of a rule. More...

Public Member Functions

bool AdoptObjects (const std::vector< NXOpen::NXObject * > &ugObjects)
 Adopt the specified ug objects.
void Copy (const NXString &oldNameChain, const NXString &oldLeafName, const NXString &newNameChain, const NXString &newLeafName)
 Copy a dynamic child or attribute rule.
void CreateChildRule (const NXString &ruleName, const NXString &className, const std::vector< NXOpen::RuleManager::ParameterRule > &parameters)
 Create a child rule and the root for this rule manager's part.
void CreateDynamicRule (const NXString &referenceChain, const NXString &ruleName, NXOpen::RuleManager::RuleType ruleType, const NXString &ruleText)
 Create or modify a dynamic rule.
void CreateDynamicRule (const NXString &referenceChain, const NXString &ruleName, const NXString &behaviors, const NXString &ruleUnits, const NXString &ruleText, const NXString &leadingComment)
 Create or modify a dynamic rule.
void CreateDynamicRule (const NXString &referenceChain, const NXString &ruleName, const NXString &behaviors, const NXString &ruleText, const NXString &leadingComment)
 Create or modify a dynamic rule.
bool CreateMode ()
 Returns the create mode flag.
bool DebugFlag ()
 Returns the debug update flag.
void DeleteChildRule (const NXString &ruleName)
 Delete a child rule from this rule manager.
void DeleteDynamicRule (const NXString &referenceChain, const NXString &ruleName)
 Delete an existing dynamic rule.
int DoKfUpdate (NXOpen::Session::UndoMarkId undoMark)
 Performs an KF update.
NXString EvaluateAnyAsString (const NXString &referenceChain)
 Evaluate a rule and return its value as a string.
NXString EvaluateAsString (const NXString &referenceChain)
 Evaluate a rule and return its value as a string.
std::vector
< NXOpen::RuleManager::AdoptableTypes
GetAdoptableTypes ()
 The list of object types which can be adopted.
std::vector< NXStringGetAncestorClasses (const NXString &className)
 Get the ancestor classes for a given class.
NXString GetClass (const NXString &referenceChain)
 Get the class of a dynamic rule.
NXString GetClassDfaFile (const NXString &className)
 Get the name of the dfa file that contains the specified class.
std::vector< NXStringGetClasses (NXOpen::RuleManager::Filter filter)
 Get class names that match the specified filter.
std::vector< NXStringGetClassesOfChildList (const NXString &referenceChain)
 Get the classes for the members of a child list rule.
void GetDebugInstances (std::vector< NXOpen::RuleManager::DebugInstance > &instances, std::vector< NXOpen::RuleManager::DebugRule > &rules)
 Get the debug update instances.
NXString GetDefaultFormula (const NXString &className, const NXString &ruleName)
 Returns the default formula for a rule within a class .
std::vector< NXStringGetDependencies (const NXString &referenceChain)
 Get the rules that the specified dynamic rule depends on.
std::vector< NXStringGetDependents (const NXString &referenceChain)
 Get the rules that depend on the specified dynamic rule.
std::vector< NXStringGetDynamicRules (const NXString &childRuleName)
 Get the reference chains of all dynamic rules defined on a child rule (or Root:).
NXString GetDynamicRuleText (const NXString &referenceChain)
 Returns the rule text for a dynamic rule .
NXOpen::RuleManager::RuleType GetDynamicRuleType (const NXString &nameChain)
 Get the data type of a dynamic routine.
int GetErrorEnd ()
 Get the parse error end location.
int GetErrorStart ()
 Get the parse error start location.
std::vector
< NXOpen::RuleManager::FunctionArgumentsInformation
GetFunctionArgumentsInformation (const NXString &functionName, const NXString &instanceOrClassName, bool isInstance, bool briefOnly)
 Get information about the arguments for a function.
NXString GetFunctionFile (const NXString &functionName)
 Get the file that contains the definitions for a function.
NXOpen::RuleManager::FunctionInformation GetFunctionInformation (const NXString &functionName, const NXString &instanceOrClassName, bool isInstance, bool briefOnly)
 Get information about a function.
std::vector< NXStringGetFunctions (NXOpen::RuleManager::Filter filter, bool doSort)
 Get functions that match the specified filter.
std::vector< NXStringGetLastError ()
 Get messages for the most recent error.
NXString GetNameChain (NXOpen::NXObject *ugObject)
 Returns the name chain.
NXString GetParameterFormula (const NXString &referenceChain, const NXString &parameterName)
 Get the formula for a parameter that has been specified on a dynamic child rule.
NXOpen::RuleManager::RuleType GetParameterType (const NXString &referenceChain)
 Get the type of a parameter in a dynamic child rule.
NXString GetReferenceText (NXOpen::NXObject *ugObject)
 Get the text to use when referencing the specified ug object in a rule.
NXString GetRulesForObjects (const std::vector< NXOpen::NXObject * > &ugObjects)
 Adoption text for the specified ug objects.
std::vector< NXStringGetRulesOfClass (const NXString &className)
 Get the names of all the rules defined in a class.
NXOpen::RuleManager::RuleType GetRuleType (const NXString &className, const NXString &ruleName)
 Get the type of a rule within a class.
NXOpen::RuleManager::RuleType GetRuleType (const NXString &referenceChain)
 Get the data type of a dynamic rule.
std::vector< NXStringGetRuleTypes ()
 Get strings that describe the rule types.
std::vector< NXStringGetSpecifiedParameters (const NXString &referenceChain)
 Get the parameters that have been specified on a dynamic child rule.
NXOpen::RuleManager::InitializationStatusType Initialize (NXOpen::RuleManager::LicenseType licenseToTake, int *intentStatus)
 Initialize the RuleManager.
bool IsCanonical (const NXString &className, const NXString &ruleName)
 Returns whether a rule within a class is canonical.
bool IsChildList (const NXString &className, const NXString &ruleName)
 Returns whether a rule within a class is a child list rule.
bool IsChildList (const NXString &referenceChain)
 Returns whether a dynamic rule is a child list.
bool IsChildRule (const NXString &className, const NXString &ruleName)
 Returns whether a rule in a class is a child rule.
bool IsChildRule (const NXString &referenceChain)
 Returns whether a dynamic rule is a child rule.
bool IsComputed (const NXString &referenceChain)
 Returns whether a dynamic rule's value has been computed yet.
bool IsExpressionRule (const NXString &ruleName)
 Determine whether a root level dynamic rule is mapped to an NX expression.
bool IsHidden (const NXString &className, const NXString &ruleName)
 Returns whether a rule within a class is hidden.
bool IsHidden (const NXString &referenceChain)
 Returns whether a dynamic rule is hidden.
bool IsLocal (const NXString &className, const NXString &ruleName)
 Returns whether a rule within a class is local to that class.
bool IsMethod (const NXString &className, const NXString &ruleName)
 Returns whether a rule within a class is a method.
bool IsMethod (const NXString &referenceChain)
 Returns whether a dynamic rule is a method.
bool IsModifiable (const NXString &className, const NXString &ruleName)
 Returns whether a rule within a class is modifiable.
bool IsModifiable (const NXString &referenceChain)
 Returns whether a dynamic rule is modifiable.
bool IsParameter (const NXString &className, const NXString &ruleName)
 Returns whether a rule within a class is a parameter of that class.
bool IsRuleInClass (const NXString &className, const NXString &ruleName)
 Returns whether the rule is defined in the specified class.
bool IsUncached (const NXString &className, const NXString &ruleName)
 Returns whether a rule within a class is uncached.
bool IsUncached (const NXString &referenceChain)
 Returns whether a dynamic rule is uncached.
bool IsUserClass (const NXString &className)
 Determine whether a class is a user class.
bool IsUserFunction (const NXString &functionName)
 Determine whether a function is one defined by the user.
NXString ReadDfaFile (const NXString &fileName)
 Read a dfa file and return its contents as a string.
void RebuildTrees ()
 Rebuilds the KF Navigator tree and any Part Inspector trees that are being shown.
void RegenerateAll ()
 Regenerate all rules.
void Reload (bool refreshUserClassDir)
 Reload all classes and functions.
void ReloadClassesAndFunctions (std::vector< NXString > &classes, std::vector< NXString > &functions)
 Reload specified classes and functions.
void ReloadSingleClass (const NXString &className)
 Reload a single class.
void RemoveAllRules ()
 Remove all rules in the part.
void RemoveRuleOnly (const NXString &referenceChain)
 Remove a dynamic child or attribute rule, but leave the geometry.
void Rename (const NXString &referenceChain, const NXString &newName)
 Rename a dynamic child or attribute rule.
void SetDebugFlag (bool debugFlag)
 Sets the debug update flag.
void SyntaxCheck (const NXString &fileName)
 Run the syntax check on a dfa file.
tag_t Tag () const
 Returns the tag of this object.
void WriteDfaFile (const NXString &fileName, const NXString &fileString, bool replace)
 Write a string out to a dfa file.

Detailed Description

Provides methods for manipulating the Knowledge Fusion rules in a part.


To obtain an instance of this class, refer to BasePart

Created in NX3.0.0.


Member Enumeration Documentation

The filter option for asking for classes.

Enumerator:
FilterUser 

User classes only.

FilterSystem 

System classes only.

FilterBoth 

Both user and system classes.

FilterUserPlus 

User and application classes.

FilterUserLoaded 

User classes that are loaded.

FilterSystemLoaded 

System classes that are loaded.

FilterBothLoaded 

System and user classes that are loaded.

FilterUserPlusLoaded 

User and application classes that are loaded.

Indicates the status from initializing RuleManager.

Enumerator:
InitializationStatusTypeSuccess 

Initialization succeeded.

InitializationStatusTypeFailure 

Initialization failed.

InitializationStatusTypeUnavailable 

Intent not available.

InitializationStatusTypeUnableToObtainLicense 

Cannot obtain license.

InitializationStatusTypeCloseFailure 

Close failed.

Indicates the license type to be used.

Enumerator:
LicenseTypeNoLicense 

no license

LicenseTypeAuthor 

author

LicenseTypeExecute 

execute

LicenseTypePipeline 

pipeline

LicenseTypeKfFeature 

kf feature

LicenseTypeKfInterop 

kf interop

LicenseTypeKfNewGeom 

kf new geom

LicenseTypeKfChecking 

kf checking

Indicates the data type of a rule.

Enumerator:
RuleTypeBoolean 

boolean

RuleTypeFrame 

frame

RuleTypeInteger 

integer

RuleTypeList 

list

RuleTypeName 

name

RuleTypeNumber 

number

RuleTypePoint 

point

RuleTypeString 

string

RuleTypeVector 

vector

RuleTypeInstance 

instance

RuleTypeAny 

any

RuleTypeHostPointer 

host pointer


Member Function Documentation

bool NXOpen::RuleManager::AdoptObjects ( const std::vector< NXOpen::NXObject * > &  ugObjects)

Adopt the specified ug objects.

Returns:
TRUE if update needs to be called
Created in NX4.0.0.

License requirements : ug_kf_execute ("UG/Knowledge Fusion - Execute") OR ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")
Parameters:
ugObjectsobjects to adopt
void NXOpen::RuleManager::Copy ( const NXString oldNameChain,
const NXString oldLeafName,
const NXString newNameChain,
const NXString newLeafName 
)

Copy a dynamic child or attribute rule.


Created in NX4.0.0.

License requirements : ug_kf_execute ("UG/Knowledge Fusion - Execute") OR ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")

Parameters:
oldNameChainName chain for rule to copy
oldLeafNameLeaf name of rule to copy
newNameChainName chain for copied rule
newLeafNameLeaf name for copied rule
void NXOpen::RuleManager::CreateChildRule ( const NXString ruleName,
const NXString className,
const std::vector< NXOpen::RuleManager::ParameterRule > &  parameters 
)

Create a child rule and the root for this rule manager's part.


Created in NX3.0.0.

License requirements : ug_kf_execute ("UG/Knowledge Fusion - Execute") OR ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")

Parameters:
ruleNameName of child rule to create
classNameClass to instantiate as this child
parametersInput parameters for this class
void NXOpen::RuleManager::CreateDynamicRule ( const NXString referenceChain,
const NXString ruleName,
NXOpen::RuleManager::RuleType  ruleType,
const NXString ruleText 
)

Create or modify a dynamic rule.


Created in NX3.0.0.

License requirements : ug_kf_execute ("UG/Knowledge Fusion - Execute") OR ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")

Parameters:
referenceChainReference chain for instance in which to create the dynamic rule
ruleNameName of rule to create
ruleTypeData type for the new rule
ruleTextValue for the new rule as a string
void NXOpen::RuleManager::CreateDynamicRule ( const NXString referenceChain,
const NXString ruleName,
const NXString behaviors,
const NXString ruleUnits,
const NXString ruleText,
const NXString leadingComment 
)

Create or modify a dynamic rule.


Created in NX4.0.0.

License requirements : ug_kf_execute ("UG/Knowledge Fusion - Execute") OR ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")

Parameters:
referenceChainReference chain for instance in which to create the dynamic rule
ruleNameName of rule to create
behaviorsBehaviors for the new rule, for example, "Number Modifiable"
ruleUnitsUnit for the new rule, for example, "mm"
ruleTextValue for the new rule as a string
leadingCommentLeading comment for rule. This can be NULL
void NXOpen::RuleManager::CreateDynamicRule ( const NXString referenceChain,
const NXString ruleName,
const NXString behaviors,
const NXString ruleText,
const NXString leadingComment 
)

Create or modify a dynamic rule.


Created in NX4.0.0.

License requirements : ug_kf_execute ("UG/Knowledge Fusion - Execute") OR ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")

Parameters:
referenceChainReference chain for instance in which to create the dynamic rule
ruleNameName of rule to create
behaviorsBehaviors for the new rule, for example, "Number Modifiable"
ruleTextValue for the new rule as a string
leadingCommentLeading comment for rule. This can be NULL

Returns the create mode flag.


Created in NX5.0.0.

License requirements : None

Returns the debug update flag.


Created in NX5.0.0.

License requirements : None

void NXOpen::RuleManager::DeleteChildRule ( const NXString ruleName)

Delete a child rule from this rule manager.


Created in NX3.0.0.

License requirements : ug_kf_execute ("UG/Knowledge Fusion - Execute") OR ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")

Parameters:
ruleNameName of child to delete
void NXOpen::RuleManager::DeleteDynamicRule ( const NXString referenceChain,
const NXString ruleName 
)

Delete an existing dynamic rule.


Created in NX3.0.0.

License requirements : ug_kf_execute ("UG/Knowledge Fusion - Execute") OR ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")

Parameters:
referenceChainReference chain for instance from which to delete the dynamic rule
ruleNameName of rule to delete

Performs an KF update.

This ensures that all KF objects will be properly updated when created through dynamic rules.
Note: This method does the same thing as, Update::DoUpdate except that it does some addition updating to make sure CAE objects are complete.

Returns:
The number of errors in the update module's error list. If errors occurred during update they will be added to that error list. To obtain a list of these errors, use Update::ErrorList
Created in NX4.0.0.

License requirements : None
Parameters:
undoMarkIf any update error occurs, the system will roll back to this undo mark.

Evaluate a rule and return its value as a string.

Returns:
Value of the rule formatted as a string
Created in NX5.0.0.

License requirements : ug_kf_execute ("UG/Knowledge Fusion - Execute") OR ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")
Parameters:
referenceChainReference chain for the rule to evaluate

Evaluate a rule and return its value as a string.

Returns:
Value of the rule formatted as a string
Created in NX3.0.0.

License requirements : ug_kf_execute ("UG/Knowledge Fusion - Execute") OR ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")
Parameters:
referenceChainReference chain for the rule to evaluate

The list of object types which can be adopted.

Returns:
Object type data
Created in NX4.0.0.

License requirements : ug_kf_execute ("UG/Knowledge Fusion - Execute") OR ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")
std::vector<NXString> NXOpen::RuleManager::GetAncestorClasses ( const NXString className)

Get the ancestor classes for a given class.

Returns:
names of ancestor classes
Created in NX4.0.0.

License requirements : ug_kf_execute ("UG/Knowledge Fusion - Execute") OR ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")
Parameters:
classNameclass name for which to get component classes
NXString NXOpen::RuleManager::GetClass ( const NXString referenceChain)

Get the class of a dynamic rule.

Returns:
Class of rule
Created in NX4.0.0.

License requirements : ug_kf_execute ("UG/Knowledge Fusion - Execute") OR ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")
Parameters:
referenceChainReference chain for rule

Get the name of the dfa file that contains the specified class.

Returns:
File name that contains the class
Created in NX4.0.0.

License requirements : ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")
Parameters:
classNameClass name

Get class names that match the specified filter.

Returns:
class names
Created in NX4.0.0.

License requirements : ug_kf_execute ("UG/Knowledge Fusion - Execute") OR ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")
Parameters:
filterfilter for classes
std::vector<NXString> NXOpen::RuleManager::GetClassesOfChildList ( const NXString referenceChain)

Get the classes for the members of a child list rule.

Returns:
Classes for members of child list
Created in NX4.0.0.

License requirements : ug_kf_execute ("UG/Knowledge Fusion - Execute") OR ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")
Parameters:
referenceChainReference chain for rule
void NXOpen::RuleManager::GetDebugInstances ( std::vector< NXOpen::RuleManager::DebugInstance > &  instances,
std::vector< NXOpen::RuleManager::DebugRule > &  rules 
)

Get the debug update instances.


Created in NX5.0.0.

License requirements : ug_kf_execute ("UG/Knowledge Fusion - Execute") OR ug_kf_author ("UG/Knowledge Fusion - Author")

Parameters:
instancesArray of instances
rulesArray of rules
NXString NXOpen::RuleManager::GetDefaultFormula ( const NXString className,
const NXString ruleName 
)

Returns the default formula for a rule within a class .

Returns:
The default formula for the rule
Created in NX3.0.0.

License requirements : ug_kf_execute ("UG/Knowledge Fusion - Execute") OR ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")
Parameters:
classNameClass name
ruleNameRule name within the class
std::vector<NXString> NXOpen::RuleManager::GetDependencies ( const NXString referenceChain)

Get the rules that the specified dynamic rule depends on.

Returns:
Reference chains for rules depending on the specified rule
Created in NX4.0.0.

License requirements : ug_kf_execute ("UG/Knowledge Fusion - Execute") OR ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")
Parameters:
referenceChainReference chain for rule
std::vector<NXString> NXOpen::RuleManager::GetDependents ( const NXString referenceChain)

Get the rules that depend on the specified dynamic rule.

Returns:
Reference chains for dependent rules
Created in NX4.0.0.

License requirements : ug_kf_execute ("UG/Knowledge Fusion - Execute") OR ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")
Parameters:
referenceChainReference chain for rule
std::vector<NXString> NXOpen::RuleManager::GetDynamicRules ( const NXString childRuleName)

Get the reference chains of all dynamic rules defined on a child rule (or Root:).

Returns:
Array of reference chains of rules in the child
Created in NX4.0.0.

License requirements : ug_kf_execute ("UG/Knowledge Fusion - Execute") OR ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")
Parameters:
childRuleNameName of child rule

Returns the rule text for a dynamic rule .

Returns:
The text of the rule
Created in NX5.0.0.

License requirements : ug_kf_execute ("UG/Knowledge Fusion - Execute") OR ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")
Parameters:
referenceChainname chain for a dynamic rule

Get the data type of a dynamic routine.

Returns:
Data type of the rule
Deprecated:
Deprecated in NX4.0.0.


Created in NX3.0.0.

License requirements : ug_kf_execute ("UG/Knowledge Fusion - Execute")

Parameters:
nameChainReference chain of rule

Get the parse error end location.

Returns:
ending character pointer
Created in NX5.0.0.

License requirements : ug_kf_execute ("UG/Knowledge Fusion - Execute")

Get the parse error start location.

Returns:
starting character pointer
Created in NX5.0.0.

License requirements : ug_kf_execute ("UG/Knowledge Fusion - Execute")
std::vector<NXOpen::RuleManager::FunctionArgumentsInformation> NXOpen::RuleManager::GetFunctionArgumentsInformation ( const NXString functionName,
const NXString instanceOrClassName,
bool  isInstance,
bool  briefOnly 
)

Get information about the arguments for a function.

Returns:
Information about the function arguments
Created in NX4.0.0.

License requirements : ug_kf_execute ("UG/Knowledge Fusion - Execute") OR ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")
Parameters:
functionNameFunction name
instanceOrClassNameInstance or class name (used only for a method)
isInstanceTRUE if instance name passed, FALSE otherwise
briefOnlyTRUE if returning brief information only

Get the file that contains the definitions for a function.

Returns:
File where the function is defined
Created in NX5.0.0.

License requirements : ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")
Parameters:
functionNameFunction name
NXOpen::RuleManager::FunctionInformation NXOpen::RuleManager::GetFunctionInformation ( const NXString functionName,
const NXString instanceOrClassName,
bool  isInstance,
bool  briefOnly 
)

Get information about a function.

Returns:
Information about the function
Created in NX4.0.0.

License requirements : ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")
Parameters:
functionNameFunction name
instanceOrClassNameInstance or class name (used only for a method otherwise null or Nothing
isInstanceTRUE if instance name passed, FALSE otherwise
briefOnlyTRUE if returning brief information only
std::vector<NXString> NXOpen::RuleManager::GetFunctions ( NXOpen::RuleManager::Filter  filter,
bool  doSort 
)

Get functions that match the specified filter.

Returns:
function names
Created in NX4.0.0.

License requirements : ug_kf_execute ("UG/Knowledge Fusion - Execute") OR ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")
Parameters:
filterfilter for functions
doSortTRUE to get the functions sorted alphabetically

Get messages for the most recent error.

Returns:
lines for error messages
Created in NX4.0.0.

License requirements : ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")

Returns the name chain.

Returns:
full name chain of the object
Created in NX5.0.0.

License requirements : ug_kf_execute ("UG/Knowledge Fusion - Execute") OR ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")
Parameters:
ugObjectobject to find name chain
NXString NXOpen::RuleManager::GetParameterFormula ( const NXString referenceChain,
const NXString parameterName 
)

Get the formula for a parameter that has been specified on a dynamic child rule.

Returns:
Formula for the specified parameter
Created in NX4.0.0.

License requirements : ug_kf_execute ("UG/Knowledge Fusion - Execute") OR ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")
Parameters:
referenceChainReference chain for rule
parameterNameParameter name

Get the type of a parameter in a dynamic child rule.

Returns:
Data type required for this rule
Created in NX4.0.0.

License requirements : ug_kf_execute ("UG/Knowledge Fusion - Execute") OR ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")
Parameters:
referenceChainReference chain for rule

Get the text to use when referencing the specified ug object in a rule.

Returns:
Reference text, either reference_chain or hostpointer text
Created in NX4.0.0.

License requirements : ug_kf_execute ("UG/Knowledge Fusion - Execute") OR ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")
Parameters:
ugObjectobject to find reference text for
NXString NXOpen::RuleManager::GetRulesForObjects ( const std::vector< NXOpen::NXObject * > &  ugObjects)

Adoption text for the specified ug objects.

Returns:
Output text for the objects
Created in NX4.0.0.

License requirements : ug_kf_execute ("UG/Knowledge Fusion - Execute") OR ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")
Parameters:
ugObjectsobjects to adopt
std::vector<NXString> NXOpen::RuleManager::GetRulesOfClass ( const NXString className)

Get the names of all the rules defined in a class.

Returns:
Array of names of rules in the class
Created in NX3.0.0.

License requirements : ug_kf_execute ("UG/Knowledge Fusion - Execute") OR ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")
Parameters:
classNameClass name

Get the type of a rule within a class.

Returns:
Data type required for this rule
Created in NX3.0.0.

License requirements : ug_kf_execute ("UG/Knowledge Fusion - Execute") OR ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")
Parameters:
classNameClass name
ruleNameRule name within the class

Get the data type of a dynamic rule.

Returns:
Data type of the rule
Created in NX4.0.0.

License requirements : ug_kf_execute ("UG/Knowledge Fusion - Execute") OR ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")
Parameters:
referenceChainReference chain for rule

Get strings that describe the rule types.

Returns:
strings for rule types
Created in NX4.0.0.

License requirements : ug_kf_execute ("UG/Knowledge Fusion - Execute") OR ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")
std::vector<NXString> NXOpen::RuleManager::GetSpecifiedParameters ( const NXString referenceChain)

Get the parameters that have been specified on a dynamic child rule.

Returns:
Array of names of parameters specified
Created in NX4.0.0.

License requirements : ug_kf_execute ("UG/Knowledge Fusion - Execute") OR ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")
Parameters:
referenceChainReference chain for rule

Initialize the RuleManager.

Returns:
Status from initializing RuleManager
Created in NX4.0.0.

License requirements : ug_kf_execute ("UG/Knowledge Fusion - Execute") OR ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")
Parameters:
licenseToTakeWhich license to take
intentStatusStatus from initializing subsystem
bool NXOpen::RuleManager::IsCanonical ( const NXString className,
const NXString ruleName 
)

Returns whether a rule within a class is canonical.

Returns:
True if the rule is canonical
Created in NX3.0.0.

License requirements : ug_kf_execute ("UG/Knowledge Fusion - Execute") OR ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")
Parameters:
classNameClass name
ruleNameRule name within the class
bool NXOpen::RuleManager::IsChildList ( const NXString className,
const NXString ruleName 
)

Returns whether a rule within a class is a child list rule.

Returns:
True if the rule is a child list rule
Created in NX4.0.0.

License requirements : ug_kf_execute ("UG/Knowledge Fusion - Execute") OR ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")
Parameters:
classNameClass name
ruleNameRule name within the class
bool NXOpen::RuleManager::IsChildList ( const NXString referenceChain)

Returns whether a dynamic rule is a child list.

Returns:
True if the rule is a child list
Created in NX4.0.0.

License requirements : ug_kf_execute ("UG/Knowledge Fusion - Execute") OR ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")
Parameters:
referenceChainReference chain for rule
bool NXOpen::RuleManager::IsChildRule ( const NXString className,
const NXString ruleName 
)

Returns whether a rule in a class is a child rule.

Returns:
True if the rule is a child rule
Created in NX4.0.0.

License requirements : ug_kf_execute ("UG/Knowledge Fusion - Execute") OR ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")
Parameters:
classNameClass name
ruleNameRule name within the class
bool NXOpen::RuleManager::IsChildRule ( const NXString referenceChain)

Returns whether a dynamic rule is a child rule.

Returns:
True if the rule is a child rule
Created in NX4.0.0.

License requirements : ug_kf_execute ("UG/Knowledge Fusion - Execute") OR ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")
Parameters:
referenceChainReference chain for rule
bool NXOpen::RuleManager::IsComputed ( const NXString referenceChain)

Returns whether a dynamic rule's value has been computed yet.

Returns:
True if the rule's value has been computed
Created in NX4.0.0.

License requirements : ug_kf_execute ("UG/Knowledge Fusion - Execute") OR ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")
Parameters:
referenceChainReference chain for rule
bool NXOpen::RuleManager::IsExpressionRule ( const NXString ruleName)

Determine whether a root level dynamic rule is mapped to an NX expression.

Returns:
True if the rule is an NX expression
Created in NX5.0.0.

License requirements : ug_kf_execute ("UG/Knowledge Fusion - Execute") OR ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")
Parameters:
ruleNameDynamic rule name
bool NXOpen::RuleManager::IsHidden ( const NXString className,
const NXString ruleName 
)

Returns whether a rule within a class is hidden.

Returns:
True if the rule is hidden
Created in NX4.0.0.

License requirements : ug_kf_execute ("UG/Knowledge Fusion - Execute") OR ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")
Parameters:
classNameClass name
ruleNameRule name within the class
bool NXOpen::RuleManager::IsHidden ( const NXString referenceChain)

Returns whether a dynamic rule is hidden.

Returns:
True if the rule is hidden
Created in NX4.0.0.

License requirements : ug_kf_execute ("UG/Knowledge Fusion - Execute") OR ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")
Parameters:
referenceChainReference chain for rule
bool NXOpen::RuleManager::IsLocal ( const NXString className,
const NXString ruleName 
)

Returns whether a rule within a class is local to that class.

Returns:
True if the rule is local to the class
Created in NX4.0.0.

License requirements : ug_kf_execute ("UG/Knowledge Fusion - Execute") OR ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")
Parameters:
classNameClass name
ruleNameRule name within the class
bool NXOpen::RuleManager::IsMethod ( const NXString className,
const NXString ruleName 
)

Returns whether a rule within a class is a method.

Returns:
True if the rule is a method
Created in NX3.0.0.

License requirements : ug_kf_execute ("UG/Knowledge Fusion - Execute") OR ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")
Parameters:
classNameClass name
ruleNameRule name within the class
bool NXOpen::RuleManager::IsMethod ( const NXString referenceChain)

Returns whether a dynamic rule is a method.

Returns:
True if the rule is a method
Created in NX4.0.0.

License requirements : ug_kf_execute ("UG/Knowledge Fusion - Execute") OR ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")
Parameters:
referenceChainReference chain for rule
bool NXOpen::RuleManager::IsModifiable ( const NXString className,
const NXString ruleName 
)

Returns whether a rule within a class is modifiable.

Returns:
True if the rule is modifiable
Created in NX3.0.0.

License requirements : ug_kf_execute ("UG/Knowledge Fusion - Execute") OR ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")
Parameters:
classNameClass name
ruleNameRule name within the class
bool NXOpen::RuleManager::IsModifiable ( const NXString referenceChain)

Returns whether a dynamic rule is modifiable.

Returns:
True if the rule is modifiable
Created in NX4.0.0.

License requirements : ug_kf_execute ("UG/Knowledge Fusion - Execute") OR ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")
Parameters:
referenceChainReference chain for rule
bool NXOpen::RuleManager::IsParameter ( const NXString className,
const NXString ruleName 
)

Returns whether a rule within a class is a parameter of that class.

Returns:
True if the rule is a parameter of the class
Created in NX3.0.0.

License requirements : ug_kf_execute ("UG/Knowledge Fusion - Execute") OR ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")
Parameters:
classNameClass name
ruleNameRule name within the class
bool NXOpen::RuleManager::IsRuleInClass ( const NXString className,
const NXString ruleName 
)

Returns whether the rule is defined in the specified class.

Returns:
True if the rule is defined in the class
Created in NX4.0.0.

License requirements : ug_kf_execute ("UG/Knowledge Fusion - Execute") OR ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")
Parameters:
classNameClass name
ruleNameRule name within the class
bool NXOpen::RuleManager::IsUncached ( const NXString className,
const NXString ruleName 
)

Returns whether a rule within a class is uncached.

Returns:
True if the rule is uncached
Created in NX4.0.0.

License requirements : ug_kf_execute ("UG/Knowledge Fusion - Execute") OR ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")
Parameters:
classNameClass name
ruleNameRule name within the class
bool NXOpen::RuleManager::IsUncached ( const NXString referenceChain)

Returns whether a dynamic rule is uncached.

Returns:
True if the rule is uncached
Created in NX4.0.0.

License requirements : ug_kf_execute ("UG/Knowledge Fusion - Execute") OR ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")
Parameters:
referenceChainReference chain for rule
bool NXOpen::RuleManager::IsUserClass ( const NXString className)

Determine whether a class is a user class.

Returns:
True if the class is a user class
Created in NX4.0.0.

License requirements : ug_kf_execute ("UG/Knowledge Fusion - Execute") OR ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")
Parameters:
classNameClass name
bool NXOpen::RuleManager::IsUserFunction ( const NXString functionName)

Determine whether a function is one defined by the user.

Returns:
True if the class is a user function
Created in NX5.0.0.

License requirements : ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")
Parameters:
functionNameFunction name

Read a dfa file and return its contents as a string.

Returns:
Contents of the file formatted as a string
Created in NX4.0.0.

License requirements : ug_kf_execute ("UG/Knowledge Fusion - Execute") OR ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")
Parameters:
fileNameFile name to read

Rebuilds the KF Navigator tree and any Part Inspector trees that are being shown.


Created in NX4.0.0.

License requirements : ug_kf_execute ("UG/Knowledge Fusion - Execute") OR ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")

Regenerate all rules.


Created in NX4.0.0.

License requirements : ug_kf_execute ("UG/Knowledge Fusion - Execute") OR ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")

void NXOpen::RuleManager::Reload ( bool  refreshUserClassDir)

Reload all classes and functions.


Created in NX4.0.0.

License requirements : ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")

Parameters:
refreshUserClassDirflag for whether to refresh search dirs after load
void NXOpen::RuleManager::ReloadClassesAndFunctions ( std::vector< NXString > &  classes,
std::vector< NXString > &  functions 
)

Reload specified classes and functions.


Created in NX4.0.0.

License requirements : ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")

Parameters:
classesnames of classes to reload
functionsnames of functions to reload
void NXOpen::RuleManager::ReloadSingleClass ( const NXString className)

Reload a single class.


Created in NX4.0.0.

License requirements : ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")

Parameters:
classNameclass name to reload

Remove all rules in the part.


Created in NX4.0.0.

License requirements : ug_kf_execute ("UG/Knowledge Fusion - Execute") OR ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")

void NXOpen::RuleManager::RemoveRuleOnly ( const NXString referenceChain)

Remove a dynamic child or attribute rule, but leave the geometry.


Created in NX4.0.0.

License requirements : ug_kf_execute ("UG/Knowledge Fusion - Execute") OR ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")

Parameters:
referenceChainReference chain for rule to remove
void NXOpen::RuleManager::Rename ( const NXString referenceChain,
const NXString newName 
)

Rename a dynamic child or attribute rule.


Created in NX4.0.0.

License requirements : ug_kf_execute ("UG/Knowledge Fusion - Execute") OR ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")

Parameters:
referenceChainReference chain for rule to rename
newNameNew leaf name
void NXOpen::RuleManager::SetDebugFlag ( bool  debugFlag)

Sets the debug update flag.


Created in NX5.0.0.

License requirements : ug_kf_execute ("UG/Knowledge Fusion - Execute") OR ug_kf_author ("UG/Knowledge Fusion - Author")

Parameters:
debugFlagdebug flag
void NXOpen::RuleManager::SyntaxCheck ( const NXString fileName)

Run the syntax check on a dfa file.


Created in NX4.0.0.

License requirements : ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")

Parameters:
fileNamedfa file to check
NOTE: The full Unicode character set is not supported for this parameter.
tag_t NXOpen::RuleManager::Tag ( ) const

Returns the tag of this object.

void NXOpen::RuleManager::WriteDfaFile ( const NXString fileName,
const NXString fileString,
bool  replace 
)

Write a string out to a dfa file.


Created in NX4.0.0.

License requirements : ug_kf_execute ("UG/Knowledge Fusion - Execute") OR ug_kf_author ("UG/Knowledge Fusion - Author") OR pts_author ("Product Template Studio (Author)")

Parameters:
fileNameFile name to write
fileStringString to write to file
replaceif TRUE, replace the file if it exists

The documentation for this class was generated from the following file:
Copyright 2011 Siemens Product Lifecycle Management Software Inc. All Rights Reserved.