NX Open C++ 参考指南 2406 v1.1
载入中...
搜索中...
未找到
NXOpen::Rule::RuleInstance类 参考

规则实例 更多...

#include <Rule_RuleInstance.hxx>

类 NXOpen::Rule::RuleInstance 继承关系图:
NXOpen::NXObject NXOpen::TaggedObject NXOpen::INXObject

Public 类型

enum  ExecutionScopeType {
  ExecutionScopeTypeDefault , ExecutionScopeTypeAllParts , ExecutionScopeTypeSelectedParts , ExecutionScopeTypeSelectedAndChildren ,
  ExecutionScopeTypeAllComponents
}
Public 类型 继承自 NXOpen::NXObject
enum  AttributeType {
  AttributeTypeInvalid , AttributeTypeNull , AttributeTypeBoolean , AttributeTypeInteger ,
  AttributeTypeReal , AttributeTypeString , AttributeTypeTime , AttributeTypeReference ,
  AttributeTypeAny = 100
}
enum  DateAndTimeFormat { DateAndTimeFormatNumeric , DateAndTimeFormatTextual }

Public 成员函数

void AddNodeInput (NXOpen::Rule::Node *node, NXOpen::Rule::NodeInput *nodeInput)
void AddNodeOutput (NXOpen::Rule::Node *node, NXOpen::Rule::NodeOutput *nodeOutput)
NXOpen::Rule::NodeOutputCreateAttributeNodeOutput (NXOpen::Rule::Node *node, const char *attrName, const char *attrValue, NXOpen::NXObject *objectTag)
NXOpen::Rule::NodeOutputCreateAttributeNodeOutput (NXOpen::Rule::Node *node, const NXString &attrName, const NXString &attrValue, NXOpen::NXObject *objectTag)
NXOpen::Rule::NodeOutputCreateAttributesNodeOutput (NXOpen::Rule::Node *node, std::vector< NXString > &attrNames, std::vector< NXString > &attrValues, NXOpen::NXObject *objectTag)
NXOpen::Rule::NodeOutputCreateBooleanNodeOutput (NXOpen::Rule::Node *node, const std::vector< bool > &boolValues)
NXOpen::Rule::NodeOutputCreateColorNodeOutput (NXOpen::Rule::Node *node, double red, double green, double blue)
NXOpen::Rule::NodeOutputCreateDoubleNodeOutput (NXOpen::Rule::Node *node, const std::vector< double > &doubleValues)
NXOpen::Rule::NodeOutputCreateFileNodeOutput (NXOpen::Rule::Node *node, const char *filename)
NXOpen::Rule::NodeOutputCreateFileNodeOutput (NXOpen::Rule::Node *node, const NXString &filename)
NXOpen::Rule::NodeOutputCreateIntegerNodeOutput (NXOpen::Rule::Node *node, const std::vector< int > &intValues)
NXOpen::Rule::NodeOutputCreateNoteTextNodeOutput (NXOpen::Rule::Node *node, std::vector< NXString > &stringValues)
NXOpen::Rule::NodeOutputCreateObjectNodeOutput (NXOpen::Rule::Node *node, const std::vector< NXOpen::NXObject * > &objectTags)
NXOpen::Rule::NodeOutputCreateStringNodeOutput (NXOpen::Rule::Node *node, std::vector< NXString > &stringValues)
void Destroy ()
int Execute ()
int ExecuteWithoutDependents ()
void GetAllOutput (std::vector< NXOpen::Rule::NodeOutput * > &allOutput)
NXOpen::Rule::NodeInputGetNodeInput (NXOpen::Rule::Node *inputNode)
NXString InstanceName ()
bool IsOutOfDate ()
NXOpen::Rule::RuleObjectRuleObject ()
NXOpen::Rule::RuleObjectCollectionRuleObjectCollection ()
void RuleOutputReset (int resetOption)
void SetInstanceName (const char *name)
void SetInstanceName (const NXString &name)
void UpdateRuleFromLibrary ()
Public 成员函数 继承自 NXOpen::NXObject
NXOpen::AttributeIteratorCreateAttributeIterator ()
NX_DEPRECATED("Deprecated in NX8.0.0. Use DeleteUserAttribute instead.") void DeleteAttributeByTypeAndTitle(NXOpen void DeleteAttributeByTypeAndTitle (NXOpen::NXObject::AttributeType type, const char *title)
NX_DEPRECATED("Deprecated in NX8.0.0. Use DeleteUserAttribute instead.") void DeleteAttributeByTypeAndTitle(NXOpen void DeleteAttributeByTypeAndTitle (NXOpen::NXObject::AttributeType type, const char *title, NXOpen::Update::Option option)
void DeleteUserAttribute (NXOpen::NXObject::AttributeType type, const char *title, bool deleteEntireArray, NXOpen::Update::Option option)
void DeleteUserAttribute (NXOpen::NXObject::AttributeType type, const NXString &title, bool deleteEntireArray, NXOpen::Update::Option option)
void DeleteUserAttributes (NXOpen::AttributeIterator *iterator, NXOpen::Update::Option option)
void DeleteUserAttributes (NXOpen::NXObject::AttributeType type, NXOpen::Update::Option option)
virtual NXOpen::INXObjectFindObject (const char *journalIdentifier)
virtual NXOpen::INXObjectFindObject (const NXString &journalIdentifier)
bool GetBooleanUserAttribute (const char *title, int index)
bool GetBooleanUserAttribute (const NXString &title, int index)
NXOpen::NXObject::ComputationalTime GetComputationalTimeUserAttribute (const char *title, int index)
NXOpen::NXObject::ComputationalTime GetComputationalTimeUserAttribute (const NXString &title, int index)
int GetIntegerAttribute (const char *title)
int GetIntegerUserAttribute (const char *title, int index)
int GetIntegerUserAttribute (const NXString &title, int index)
bool GetNextUserAttribute (NXOpen::AttributeIterator *iterator, NXOpen::NXObject::AttributeInformation *info)
NXString GetPdmReferenceAttributeValue (const char *attributeTitle)
 获取指定对象的PDM参考属性值。 用户需提供属性标题,将返回UI显示的属性值。
NXString GetPdmReferenceAttributeValue (const NXString &attributeTitle)
 获取指定对象的PDM参考属性值。 用户需提供属性标题,将返回UI显示的属性值。
double GetRealAttribute (const char *title)
double GetRealUserAttribute (const char *title, int index)
double GetRealUserAttribute (const NXString &title, int index)
NXString GetReferenceAttribute (const char *title)
NXString GetStringAttribute (const char *title)
NXString GetStringUserAttribute (const char *title, int index)
NXString GetStringUserAttribute (const NXString &title, int index)
NX_DEPRECATED("Deprecated in NX8.0.0. Use GetUserAttribute instead.") NXString GetTimeAttribute(NXOpen NXString GetTimeAttribute (NXOpen::NXObject::DateAndTimeFormat format, const char *title)
NXString GetTimeUserAttribute (const char *title, int index)
NXString GetTimeUserAttribute (const NXString &title, int index)
NX_DEPRECATED("Deprecated in NX11.0.0. Use GetUserAttribute instead.") std std::vector< NXOpen::NXObject::AttributeInformationGetUserAttribute (const char *title, bool includeUnset, bool addStringValues, NXOpen::NXObject::AttributeType type)
NXOpen::NXObject::AttributeInformation GetUserAttribute (const char *title, NXOpen::NXObject::AttributeType type, int index)
NXOpen::NXObject::AttributeInformation GetUserAttribute (const NXString &title, NXOpen::NXObject::AttributeType type, int index)
NXString GetUserAttributeAsString (const char *title, NXOpen::NXObject::AttributeType type, int index)
NXString GetUserAttributeAsString (const NXString &title, NXOpen::NXObject::AttributeType type, int index)
int GetUserAttributeCount (NXOpen::AttributeIterator *iterator)
int GetUserAttributeCount (NXOpen::AttributeIterator *iterator, bool countArrayAsOneAttribute)
int GetUserAttributeCount (NXOpen::NXObject::AttributeType type)
int GetUserAttributeCount (NXOpen::NXObject::AttributeType type, bool includeUnset, bool countArrayAsOneAttribute)
bool GetUserAttributeLock (const char *title, NXOpen::NXObject::AttributeType type)
bool GetUserAttributeLock (const NXString &title, NXOpen::NXObject::AttributeType type)
std::vector< NXOpen::NXObject::AttributeInformationGetUserAttributes ()
std::vector< NXOpen::NXObject::AttributeInformationGetUserAttributes (bool includeUnset)
std::vector< NXOpen::NXObject::AttributeInformationGetUserAttributes (NXOpen::AttributeIterator *iterator)
int GetUserAttributeSize (const char *title, NXOpen::NXObject::AttributeType type)
int GetUserAttributeSize (const NXString &title, NXOpen::NXObject::AttributeType type)
std::vector< NXOpen::NXObject * > GetUserAttributeSourceObjects ()
bool HasUserAttribute (const char *title, NXOpen::NXObject::AttributeType type, int index)
bool HasUserAttribute (const NXString &title, NXOpen::NXObject::AttributeType type, int index)
bool HasUserAttribute (NXOpen::AttributeIterator *iterator)
virtual bool IsOccurrence ()
virtual NXString JournalIdentifier ()
virtual NXString Name ()
 NX_DEPRECATED ("Deprecated in NX8.0.0. Use GetUserAttribute instead.") double GetRealAttribute(const NXString &title)
 NX_DEPRECATED ("Deprecated in NX8.0.0. Use GetUserAttribute instead.") int GetIntegerAttribute(const NXString &title)
 NX_DEPRECATED ("Deprecated in NX8.0.0. Use GetUserAttribute instead.") NXString GetReferenceAttribute(const NXString &title)
 NX_DEPRECATED ("Deprecated in NX8.0.0. Use GetUserAttribute instead.") NXString GetStringAttribute(const NXString &title)
 NX_DEPRECATED ("Deprecated in NX8.0.0. Use SetUserAttribute instead.") void SetAttribute(const NXString &title
 NX_DEPRECATED ("Deprecated in NX8.0.0. Use SetUserAttribute instead.") void SetAttribute(const NXString &title
 NX_DEPRECATED ("Deprecated in NX8.0.0. Use SetUserAttribute instead.") void SetAttribute(const NXString &title
 NX_DEPRECATED ("Deprecated in NX8.0.0. Use SetUserAttribute instead.") void SetAttribute(const NXString &title
 NX_DEPRECATED ("Deprecated in NX8.0.0. Use SetUserAttribute instead.") void SetAttribute(const NXString &title
 NX_DEPRECATED ("Deprecated in NX8.0.0. Use SetUserAttribute instead.") void SetAttribute(const NXString &title
 NX_DEPRECATED ("Deprecated in NX8.0.0. Use SetUserAttribute instead.") void SetAttribute(const NXString &title
 NX_DEPRECATED ("Deprecated in NX8.0.0. Use SetUserAttribute instead.") void SetAttribute(const NXString &title)
 NX_DEPRECATED ("Deprecated in NX8.0.0. Use SetUserAttribute instead.") void SetReferenceAttribute(const NXString &title
 NX_DEPRECATED ("Deprecated in NX8.0.0. Use SetUserAttribute instead.") void SetReferenceAttribute(const NXString &title
 NX_DEPRECATED ("Deprecated in NX8.0.0. Use SetUserAttribute instead.") void SetTimeAttribute(const NXString &title
 NX_DEPRECATED ("Deprecated in NX8.0.0. Use SetUserAttribute instead.") void SetTimeAttribute(const NXString &title
virtual NXOpen::Assemblies::ComponentOwningComponent ()
virtual NXOpen::BasePartOwningPart ()
virtual void Print ()
virtual NXOpen::INXObjectPrototype ()
void SetAttribute (const char *title)
void SetAttribute (const char *title, const char *value)
void SetAttribute (const char *title, const char *value, NXOpen::Update::Option option)
void SetAttribute (const char *title, double value)
void SetAttribute (const char *title, double value, NXOpen::Update::Option option)
void SetAttribute (const char *title, int value)
void SetAttribute (const char *title, int value, NXOpen::Update::Option option)
void SetAttribute (const char *title, NXOpen::Update::Option option)
void SetBooleanUserAttribute (const char *title, int index, bool value, NXOpen::Update::Option option)
void SetBooleanUserAttribute (const NXString &title, int index, bool value, NXOpen::Update::Option option)
virtual void SetName (const char *name)
virtual void SetName (const NXString &name)
void SetPdmReferenceAttribute (const char *attributeTitle, const char *attributeValue)
 设置对象的PDM参考属性值。 用户需提供属性标题和UI显示的别名值。若参考属性为数组类型,此操作将被忽略。 别名字符串会转换为内部值(如会话标识符),并将该内部值设置到指定对象上。
创建于NX12.0.0。

许可要求:无
void SetPdmReferenceAttribute (const NXString &attributeTitle, const NXString &attributeValue)
 设置对象的PDM参考属性值。 用户需提供属性标题和UI显示的别名值。若参考属性为数组类型,此操作将被忽略。 别名字符串会转换为内部值(如会话标识符),并将该内部值设置到指定对象上。
创建于NX12.0.0。

许可要求:无
void SetReferenceAttribute (const char *title, const char *value)
void SetReferenceAttribute (const char *title, const char *value, NXOpen::Update::Option option)
void SetTimeAttribute (const char *title, const char *value)
void SetTimeAttribute (const char *title, const char *value, NXOpen::Update::Option option)
void SetTimeUserAttribute (const char *title, int index, const char *value, NXOpen::Update::Option option)
void SetTimeUserAttribute (const char *title, int index, const NXOpen::NXObject::ComputationalTime &value, NXOpen::Update::Option option)
void SetTimeUserAttribute (const NXString &title, int index, const NXOpen::NXObject::ComputationalTime &value, NXOpen::Update::Option option)
void SetTimeUserAttribute (const NXString &title, int index, const NXString &value, NXOpen::Update::Option option)
void SetUserAttribute (const char *title, int index, const char *value, NXOpen::Update::Option option)
void SetUserAttribute (const char *title, int index, double value, NXOpen::Update::Option option)
void SetUserAttribute (const char *title, int index, int value, NXOpen::Update::Option option)
void SetUserAttribute (const char *title, int index, NXOpen::Update::Option option)
void SetUserAttribute (const NXOpen::NXObject::AttributeInformation &info, NXOpen::Update::Option option)
void SetUserAttribute (const NXString &title, int index, const NXString &value, NXOpen::Update::Option option)
void SetUserAttribute (const NXString &title, int index, double value, NXOpen::Update::Option option)
void SetUserAttribute (const NXString &title, int index, int value, NXOpen::Update::Option option)
void SetUserAttribute (const NXString &title, int index, NXOpen::Update::Option option)
void SetUserAttributeLock (const char *title, NXOpen::NXObject::AttributeType type, bool lock)
void SetUserAttributeLock (const NXString &title, NXOpen::NXObject::AttributeType type, bool lock)
Public 成员函数 继承自 NXOpen::TaggedObject
tag_t Tag () const

友元

class _RuleInstanceBuilder

额外继承的成员函数

Public 属性 继承自 NXOpen::NXObject
NXOpen::Update::Option option
const NXString NXOpen::Update::Option option
double NXOpen::Update::Option option
int NXOpen::Update::Option option
const NXStringvalue
double value
int value

详细描述

规则实例

表示一个 NXOpen::Rule::RuleInstance
这是一个规则实例类。

于NX1953.0.0版本创建。

成员枚举类型说明

◆ ExecutionScopeType

规则执行的作用域类型

枚举值
ExecutionScopeTypeDefault 

仅工作部件,即规则实例所属部件

ExecutionScopeTypeAllParts 

若规则实例所属部件为装配,则包含该装配中的所有部件

ExecutionScopeTypeSelectedParts 

若规则实例所属部件为装配,则包含该装配中所有选中的组件

ExecutionScopeTypeSelectedAndChildren 

若规则实例所属部件为装配,则包含该装配中所有选中的组件及其子组件

ExecutionScopeTypeAllComponents 

若规则实例所属部件为装配,则包含该装配中的所有组件

成员函数说明

◆ AddNodeInput()

void NXOpen::Rule::RuleInstance::AddNodeInput ( NXOpen::Rule::Node * node,
NXOpen::Rule::NodeInput * nodeInput )

为规则实例添加输入
版本:NX1953.0.0

许可要求:无

参数
node节点
nodeInput节点输入

◆ AddNodeOutput()

void NXOpen::Rule::RuleInstance::AddNodeOutput ( NXOpen::Rule::Node * node,
NXOpen::Rule::NodeOutput * nodeOutput )

为规则实例添加节点输出
版本:NX1953.0.0

许可要求:无

参数
node节点
nodeOutput节点输出

◆ CreateAttributeNodeOutput() [1/2]

NXOpen::Rule::NodeOutput * NXOpen::Rule::RuleInstance::CreateAttributeNodeOutput ( NXOpen::Rule::Node * node,
const char * attrName,
const char * attrValue,
NXOpen::NXObject * objectTag )

为规则实例创建属性节点输出
版本:NX1953.0.0

许可要求:无

参数
node节点
attrName属性名
attrValue属性值
objectTag对象标识

◆ CreateAttributeNodeOutput() [2/2]

NXOpen::Rule::NodeOutput * NXOpen::Rule::RuleInstance::CreateAttributeNodeOutput ( NXOpen::Rule::Node * node,
const NXString & attrName,
const NXString & attrValue,
NXOpen::NXObject * objectTag )

为规则实例创建属性节点输出
版本:NX1953.0.0

许可要求:无

参数
node节点
attrName属性名
attrValue属性值
objectTag对象标识

◆ CreateAttributesNodeOutput()

NXOpen::Rule::NodeOutput * NXOpen::Rule::RuleInstance::CreateAttributesNodeOutput ( NXOpen::Rule::Node * node,
std::vector< NXString > & attrNames,
std::vector< NXString > & attrValues,
NXOpen::NXObject * objectTag )

为规则实例创建属性节点输出
版本:NX1953.0.0

许可要求:无

参数
node节点
attrNames属性名列表
attrValues属性值列表
objectTag对象标识

◆ CreateBooleanNodeOutput()

NXOpen::Rule::NodeOutput * NXOpen::Rule::RuleInstance::CreateBooleanNodeOutput ( NXOpen::Rule::Node * node,
const std::vector< bool > & boolValues )

为规则实例创建布尔类型的节点输出
版本:NX1953.0.0

许可要求:无

参数
node节点
boolValues布尔值集合

◆ CreateColorNodeOutput()

NXOpen::Rule::NodeOutput * NXOpen::Rule::RuleInstance::CreateColorNodeOutput ( NXOpen::Rule::Node * node,
double red,
double green,
double blue )

为规则实例创建颜色类型的节点输出
版本:NX1953.0.0

许可要求:无

参数
node节点
red红色通道值
green绿色通道值
blue蓝色通道值

◆ CreateDoubleNodeOutput()

NXOpen::Rule::NodeOutput * NXOpen::Rule::RuleInstance::CreateDoubleNodeOutput ( NXOpen::Rule::Node * node,
const std::vector< double > & doubleValues )

为规则实例创建双精度类型的节点输出
版本:NX1953.0.0

许可要求:无

参数
node节点
doubleValues双精度值集合

◆ CreateFileNodeOutput() [1/2]

NXOpen::Rule::NodeOutput * NXOpen::Rule::RuleInstance::CreateFileNodeOutput ( NXOpen::Rule::Node * node,
const char * filename )

为规则实例创建文件类型的节点输出
版本:NX1953.0.0

许可要求:无

参数
node节点
filename文件名

◆ CreateFileNodeOutput() [2/2]

NXOpen::Rule::NodeOutput * NXOpen::Rule::RuleInstance::CreateFileNodeOutput ( NXOpen::Rule::Node * node,
const NXString & filename )

为规则实例创建文件类型的节点输出
版本:NX1953.0.0

许可要求:无

参数
node节点
filename文件名

◆ CreateIntegerNodeOutput()

NXOpen::Rule::NodeOutput * NXOpen::Rule::RuleInstance::CreateIntegerNodeOutput ( NXOpen::Rule::Node * node,
const std::vector< int > & intValues )

为规则实例创建整数类型的节点输出
版本:NX1953.0.0

许可要求:无

参数
node节点
intValues整数值集合

◆ CreateNoteTextNodeOutput()

NXOpen::Rule::NodeOutput * NXOpen::Rule::RuleInstance::CreateNoteTextNodeOutput ( NXOpen::Rule::Node * node,
std::vector< NXString > & stringValues )

为规则实例创建注释文本节点输出
版本:NX1980.0.0

许可要求:特征建模 ("FEATURES MODELING") 或装配模块 ("ASSEMBLIES MODULE")

参数
node节点
stringValues字符串值列表

◆ CreateObjectNodeOutput()

NXOpen::Rule::NodeOutput * NXOpen::Rule::RuleInstance::CreateObjectNodeOutput ( NXOpen::Rule::Node * node,
const std::vector< NXOpen::NXObject * > & objectTags )

为规则实例创建NXObject类型的节点输出
版本:NX1953.0.0

许可要求:无

参数
node节点
objectTags对象标签集合

◆ CreateStringNodeOutput()

NXOpen::Rule::NodeOutput * NXOpen::Rule::RuleInstance::CreateStringNodeOutput ( NXOpen::Rule::Node * node,
std::vector< NXString > & stringValues )

为规则实例创建字符串类型的节点输出
版本:NX1953.0.0

许可要求:无

参数
node节点
stringValues字符串值集合

◆ Destroy()

void NXOpen::Rule::RuleInstance::Destroy ( )

销毁规则实例
版本:NX1953.0.0

许可要求:无

◆ Execute()

int NXOpen::Rule::RuleInstance::Execute ( )

执行规则实例
于NX1953.0.0版本创建。

许可证要求: 无

◆ ExecuteWithoutDependents()

int NXOpen::Rule::RuleInstance::ExecuteWithoutDependents ( )

不执行依赖规则的情况下执行当前规则实例
于NX1980.0.0版本创建。

许可证要求: 无

◆ GetAllOutput()

void NXOpen::Rule::RuleInstance::GetAllOutput ( std::vector< NXOpen::Rule::NodeOutput * > & allOutput)

获取规则实例的所有输出
版本:NX1953.0.0

许可要求:无

参数
allOutput所有输出

◆ GetNodeInput()

NXOpen::Rule::NodeInput * NXOpen::Rule::RuleInstance::GetNodeInput ( NXOpen::Rule::Node * inputNode)

获取规则实例的节点输入
版本:NX1953.0.0

许可要求:无

参数
inputNode输入节点

◆ InstanceName()

NXString NXOpen::Rule::RuleInstance::InstanceName ( )

获取规则实例名称
版本:NX1953.0.0

许可要求:无

◆ IsOutOfDate()

bool NXOpen::Rule::RuleInstance::IsOutOfDate ( )

检查规则实例是否过期
版本:NX1953.0.0

许可要求:无

◆ RuleObject()

NXOpen::Rule::RuleObject * NXOpen::Rule::RuleInstance::RuleObject ( )

获取规则实例的规则对象
版本:NX1953.0.0

许可要求:无

◆ RuleObjectCollection()

NXOpen::Rule::RuleObjectCollection * NXOpen::Rule::RuleInstance::RuleObjectCollection ( )

获取此规则实例所属的规则对象集合
版本:NX1953.0.0

◆ RuleOutputReset()

void NXOpen::Rule::RuleInstance::RuleOutputReset ( int resetOption)

重置规则实例以清除缓存
版本:NX1953.0.0

许可要求:无

参数
resetOption重置选项

◆ SetInstanceName() [1/2]

void NXOpen::Rule::RuleInstance::SetInstanceName ( const char * name)

设置规则实例名称
版本:NX1953.0.0

许可要求:无

参数
name名称

◆ SetInstanceName() [2/2]

void NXOpen::Rule::RuleInstance::SetInstanceName ( const NXString & name)

设置规则实例名称
版本:NX1953.0.0

许可要求:无

参数
name名称

◆ UpdateRuleFromLibrary()

void NXOpen::Rule::RuleInstance::UpdateRuleFromLibrary ( )

从规则库更新规则实例
版本:NX1953.0.0

许可要求:无