VisualReport Class

class NXOpen.VisualReporting.VisualReport

Bases: NXOpen.NXObject

A visual report can be activated by the NXOpen.VisualReporting.VisualReportManager to apply colors to objects in the graphics window.

An active visual report groups objects according to filtering conditions and classification rules. The contents of the groups can be accessed via NXOpen.VisualReporting.VisualReport.GetGroupLabels() and NXOpen.VisualReporting.VisualReport.GetObjectsInGroup().

New in version NX7.0.0.

Properties

Property Description
BitmapName Returns or sets the bitmap name of this NXOpen.VisualReporting.VisualReport.
CustomMessage Returns or sets the custom message of this NXOpen.VisualReporting.VisualReport.
Description Returns or sets the description of this NXOpen.VisualReporting.VisualReport
DescriptiveCategory Returns or sets the category of this NXOpen.VisualReporting.VisualReport.
DestinationTeamcenterFolder Returns or sets the destination Teamcenter folder for saving the NXOpen.VisualReporting.VisualReport to Teamcenter database.
Filename Returns or sets the filename where this NXOpen.VisualReporting.VisualReport was opened from or will be saved to.
IsOccurrence Returns whether this object is an occurrence or not.
IsUnmatchedGroupEnabled Returns or sets whether use of NXOpen.VisualReporting.VisualReport.UnmatchedGroupLabel() is enabled.
JournalIdentifier Returns the identifier that would be recorded in a journal for this object.
Name Returns the custom name of the object.
OwningComponent Returns the owning component, if this object is an occurrence.
OwningPart Returns the owning part of this object
Prototype Returns the prototype of this object if it is an occurrence.
ReportContext Returns or sets the NXOpen.VisualReporting.VisualReportReportContextOption of this NXOpen.VisualReporting.VisualReport.
ReportingObjectType Returns or sets the NXOpen.VisualReporting.VisualReportReportingObjectTypeOption of this NXOpen.VisualReporting.VisualReport.
ReportingStyle Returns or sets the NXOpen.VisualReporting.VisualReportReportingStyleOption of this NXOpen.VisualReporting.VisualReport.
SaveDestination Returns or sets the NXOpen.VisualReporting.VisualReportSaveDestinationOption of the NXOpen.VisualReporting.VisualReport.
ScopeType Returns the NXOpen.VisualReporting.VisualReportScopeTypeOption of this NXOpen.VisualReporting.VisualReport.
Tag Returns the Tag for this object.
UnmatchedGroupLabel Returns the NXOpen.VisualReporting.GroupLabel which is used for unmatched object.
UnmatchedResultCategory Returns the NXOpen.VisualReporting.UnmatchedResultCategory from the activated NXOpen.VisualReporting.VisualReport.

Methods

Method Description
CreateAttributeIterator Create an attribute iterator
DeleteAllAttributesByType Deletes all attributes of a specific type.
DeleteAttributeByTypeAndTitle Deletes an attribute by type and title.
DeleteUserAttribute Deletes the first attribute encountered with the given Type, Title.
DeleteUserAttributes Deletes the attributes on the object, if any, that satisfy the given iterator
FindObject Finds the NXOpen.NXObject with the given identifier as recorded in a journal.
GetAllDefinedProperties Returns the NXOpen.VisualReporting.Property`s which has been defined in this :py:class:`NXOpen.VisualReporting.VisualReport.
GetAttributeTitlesByType Gets all the attribute titles of a specific type.
GetBooleanUserAttribute Gets a boolean attribute by Title and array Index.
GetComputationalTimeUserAttribute Gets a time attribute by Title and array Index.
GetGroupLabels Returns the result NXOpen.VisualReporting.GroupLabel`s from the activated :py:class:`NXOpen.VisualReporting.VisualReport.
GetGroupLabelsOfResultCategory Returns the result NXOpen.VisualReporting.GroupLabel`s of a :py:class:`NXOpen.VisualReporting.ResultCategory from the activated NXOpen.VisualReporting.VisualReport.
GetIntegerAttribute Gets an integer attribute by title.
GetIntegerUserAttribute Gets an integer attribute by Title and array Index.
GetKeywords Gets a comma separated string of the keywords for this NXOpen.VisualReporting.VisualReport.
GetNextUserAttribute Gets the next attribute encountered on the object, if any, that satisfies the given iterator.
GetObjectTypes Returns the NXOpen.VisualReporting.VisualReportObjectTypeOption`s of this :py:class:`NXOpen.VisualReporting.VisualReport.
GetObjectsInGroup Returns the NXOpen.NXObject`s that belong to the group            with this :py:class:`NXOpen.VisualReporting.GroupLabel.
GetPdmReferenceAttributeValue Gets the value of PDM Reference attribute for given object.
GetPropertyValueOfObject Returns the value of the NXOpen.VisualReporting.Property`s for the :py:class:`NXOpen.NXObject in the result NXOpen.VisualReporting.GroupLabel.
GetRealAttribute Gets a real attribute by title.
GetRealUserAttribute Gets a real attribute by Title and array Index.
GetReferenceAttribute Gets the reference string (not the calculated value) of a string attribute that uses a reference string.
GetResultCategories Returns the NXOpen.VisualReporting.ResultCategory`s from the activated :py:class:`NXOpen.VisualReporting.VisualReport.
GetRule Return the specified NXOpen.VisualReporting.Rule from this NXOpen.VisualReporting.VisualReport
GetRules Returns all the NXOpen.VisualReporting.Rule`s in this :py:class:`NXOpen.VisualReporting.VisualReport
GetStringAttribute Gets a string attribute value by title.
GetStringUserAttribute Gets a string attribute by Title and array Index.
GetTimeAttribute Gets a time attribute by title.
GetTimeUserAttribute Gets a time attribute by Title and array Index.
GetUserAttribute Gets the first attribute encountered on the object, if any, with a given Title, Type and array Index.
GetUserAttributeAsString Gets the first attribute encountered on the object, if any, with a given title, type and array index.
GetUserAttributeCount Gets the count of set attributes on the object, if any, that satisfy the given iterator.
GetUserAttributeLock Determine the lock of the given attribute.
GetUserAttributeSize Gets the size of the first attribute encountered on the object, if any, with a given Title and Type.
GetUserAttributeSourceObjects Returns an array of objects from which this object presents attributes.
GetUserAttributes Gets all the attributes that have been set on the given object, if any, that satisfy the given iterator.
GetUserAttributesAsStrings Gets all the attributes that have been set on the given object.
HasUserAttribute Determines if an attribute exists on the object, that satisfies the given iterator
Print Prints a representation of this object to the system log file.
RemoveResultCategory Removes the NXOpen.VisualReporting.ResultCategory from NXOpen.VisualReporting.VisualReport.
Save Saves this NXOpen.VisualReporting.VisualReport to its current NXOpen.VisualReporting.VisualReport.Filename().
SetAttribute Creates or modifies an integer attribute.
SetBooleanUserAttribute Creates or modifies a boolean attribute with the option to update or not.
SetKeywords Sets a comma separated string of the keywords for this NXOpen.VisualReporting.VisualReport.
SetName Sets the custom name of the object.
SetPdmReferenceAttribute Sets the value of PDM Reference attribute on the object.
SetReferenceAttribute Creates or modifies a string attribute which uses a reference string.
SetTimeAttribute Creates or modifies a time attribute.
SetTimeUserAttribute Creates or modifies a time attribute with the option to update or not.
SetUserAttribute Creates or modifies an attribute with the option to update or not.
SetUserAttributeLock Lock or unlock the given attribute.

Property Detail

BitmapName

VisualReport.BitmapName

Returns or sets the bitmap name of this NXOpen.VisualReporting.VisualReport.

-------------------------------------

Getter Method

Signature BitmapName

Returns:
Return type:str

New in version NX8.0.0.

License requirements: None.

-------------------------------------

Setter Method

Signature BitmapName

Parameters:bitmapName (str) –

New in version NX8.0.0.

License requirements: nx_visual_reporting (“Visual Reporting”)

CustomMessage

VisualReport.CustomMessage

Returns or sets the custom message of this NXOpen.VisualReporting.VisualReport.

-------------------------------------

Getter Method

Signature CustomMessage

Returns:
Return type:str

New in version NX8.0.0.

License requirements: None.

-------------------------------------

Setter Method

Signature CustomMessage

Parameters:customMessage (str) –

New in version NX8.0.0.

License requirements: nx_visual_reporting (“Visual Reporting”)

Description

VisualReport.Description

Returns or sets the description of this NXOpen.VisualReporting.VisualReport

-------------------------------------

Getter Method

Signature Description

Returns:
Return type:str

New in version NX7.0.0.

License requirements: None.

-------------------------------------

Setter Method

Signature Description

Parameters:description (str) –

New in version NX8.0.0.

License requirements: nx_visual_reporting (“Visual Reporting”)

DescriptiveCategory

VisualReport.DescriptiveCategory

Returns or sets the category of this NXOpen.VisualReporting.VisualReport.

-------------------------------------

Getter Method

Signature DescriptiveCategory

Returns:
Return type:str

New in version NX7.5.0.

License requirements: None.

-------------------------------------

Setter Method

Signature DescriptiveCategory

Parameters:category (str) –

New in version NX8.0.0.

License requirements: nx_visual_reporting (“Visual Reporting”)

DestinationTeamcenterFolder

VisualReport.DestinationTeamcenterFolder

Returns or sets the destination Teamcenter folder for saving the NXOpen.VisualReporting.VisualReport to Teamcenter database.

Note that this property is only needed when NX is connected to Teamcenter and report is saved as a copy to Teamcenter database. This NXOpen.VisualReporting.VisualReport.DestinationTeamcenterFolder() may return None if you haven’t set a folder name on this property.

-------------------------------------

Getter Method

Signature DestinationTeamcenterFolder

Returns:The Teamcenter folder name
Return type:str

New in version NX8.0.0.

License requirements: None.

-------------------------------------

Setter Method

Signature DestinationTeamcenterFolder

Parameters:foldername (str) – The Teamcenter folder name

New in version NX8.0.0.

License requirements: nx_visual_reporting (“Visual Reporting”)

Filename

VisualReport.Filename

Returns or sets the filename where this NXOpen.VisualReporting.VisualReport was opened from or will be saved to.

Note that when NX is connected to Teamcenter, this property is the report dataset identifier from Teamcenter database. If it is a new report, it will be the report dataset name. When the report is save by NXOpen.VisualReporting.VisualReport.Save(), the report dataset identifier will be saved in this property.

-------------------------------------

Getter Method

Signature Filename

Returns:
Return type:str

New in version NX7.0.0.

License requirements: None.

-------------------------------------

Setter Method

Signature Filename

Parameters:filename (str) –

New in version NX8.0.0.

License requirements: nx_visual_reporting (“Visual Reporting”)

IsOccurrence

VisualReport.IsOccurrence

Returns whether this object is an occurrence or not.

-------------------------------------

Getter Method

Signature IsOccurrence

Returns:This object is an occurrence
Return type:bool

New in version NX3.0.0.

License requirements: None.

IsUnmatchedGroupEnabled

VisualReport.IsUnmatchedGroupEnabled

Returns or sets whether use of NXOpen.VisualReporting.VisualReport.UnmatchedGroupLabel() is enabled.

-------------------------------------

Getter Method

Signature IsUnmatchedGroupEnabled

Returns:Whether the unmatched group is enabled
Return type:bool

New in version NX7.0.0.

License requirements: None.

-------------------------------------

Setter Method

Signature IsUnmatchedGroupEnabled

Parameters:isUnmatchedGroupEnabled (bool) – Whether the unmatched group is enabled

New in version NX8.0.0.

License requirements: nx_visual_reporting (“Visual Reporting”)

JournalIdentifier

VisualReport.JournalIdentifier

Returns the identifier that would be recorded in a journal for this object.

This may not be the same across different releases of the software.

-------------------------------------

Getter Method

Signature JournalIdentifier

Returns:
Return type:str

New in version NX3.0.0.

License requirements: None.

Name

VisualReport.Name

Returns the custom name of the object.

-------------------------------------

Getter Method

Signature Name

Returns:
Return type:str

New in version NX3.0.0.

License requirements: None.

OwningComponent

VisualReport.OwningComponent

Returns the owning component, if this object is an occurrence.

-------------------------------------

Getter Method

Signature OwningComponent

Returns:
Return type:NXOpen.Assemblies.Component

New in version NX3.0.0.

License requirements: None.

OwningPart

VisualReport.OwningPart

Returns the owning part of this object

-------------------------------------

Getter Method

Signature OwningPart

Returns:The owning part of this object or null if it does not have an owner
Return type:NXOpen.BasePart

New in version NX3.0.0.

License requirements: None.

Prototype

VisualReport.Prototype

Returns the prototype of this object if it is an occurrence.

-------------------------------------

Getter Method

Signature Prototype

Returns:The prototype of this object or null if this object is not an occurrence
Return type:NXOpen.INXObject

New in version NX3.0.0.

License requirements: None.

ReportContext

VisualReport.ReportContext

Returns or sets the NXOpen.VisualReporting.VisualReportReportContextOption of this NXOpen.VisualReporting.VisualReport.

-------------------------------------

Getter Method

Signature ReportContext

Returns:
Return type:NXOpen.VisualReporting.VisualReportReportContextOption

New in version NX9.0.0.

License requirements: None.

-------------------------------------

Setter Method

Signature ReportContext

Parameters:reportContext (NXOpen.VisualReporting.VisualReportReportContextOption) –

New in version NX9.0.3.

License requirements: nx_visual_reporting (“Visual Reporting”)

ReportingObjectType

VisualReport.ReportingObjectType

Returns or sets the NXOpen.VisualReporting.VisualReportReportingObjectTypeOption of this NXOpen.VisualReporting.VisualReport.

Only valid if the NXOpen.VisualReporting.VisualReport.ScopeType() of the NXOpen.VisualReporting.VisualReport is NXOpen.VisualReporting.VisualReportScopeTypeOption.Component type.

-------------------------------------

Getter Method

Signature ReportingObjectType

Returns:
Return type:NXOpen.VisualReporting.VisualReportReportingObjectTypeOption

New in version NX8.0.0.

License requirements: None.

-------------------------------------

Setter Method

Signature ReportingObjectType

Parameters:reportingObjectType (NXOpen.VisualReporting.VisualReportReportingObjectTypeOption) –

New in version NX8.0.0.

License requirements: nx_visual_reporting (“Visual Reporting”)

ReportingStyle

VisualReport.ReportingStyle

Returns or sets the NXOpen.VisualReporting.VisualReportReportingStyleOption of this NXOpen.VisualReporting.VisualReport.

-------------------------------------

Getter Method

Signature ReportingStyle

Returns:
Return type:NXOpen.VisualReporting.VisualReportReportingStyleOption

New in version NX7.0.0.

License requirements: None.

-------------------------------------

Setter Method

Signature ReportingStyle

Parameters:reportingStyle (NXOpen.VisualReporting.VisualReportReportingStyleOption) –

New in version NX7.5.1.

License requirements: nx_visual_reporting (“Visual Reporting”)

SaveDestination

VisualReport.SaveDestination

Returns or sets the NXOpen.VisualReporting.VisualReportSaveDestinationOption of the NXOpen.VisualReporting.VisualReport.

Note that this property will always be NXOpen.VisualReporting.VisualReportSaveDestinationOption.Local when NX is not connected to Teamcenter.

-------------------------------------

Getter Method

Signature SaveDestination

Returns:The destination option
Return type:NXOpen.VisualReporting.VisualReportSaveDestinationOption

New in version NX8.0.0.

License requirements: None.

-------------------------------------

Setter Method

Signature SaveDestination

Parameters:destinationOption (NXOpen.VisualReporting.VisualReportSaveDestinationOption) – The destination option

New in version NX8.0.0.

License requirements: nx_visual_reporting (“Visual Reporting”)

ScopeType

VisualReport.ScopeType

Returns the NXOpen.VisualReporting.VisualReportScopeTypeOption of this NXOpen.VisualReporting.VisualReport.

-------------------------------------

Getter Method

Signature ScopeType

Returns:
Return type:NXOpen.VisualReporting.VisualReportScopeTypeOption

New in version NX9.0.0.

License requirements: None.

UnmatchedGroupLabel

VisualReport.UnmatchedGroupLabel

Returns the NXOpen.VisualReporting.GroupLabel which is used for unmatched object.

It will return None if the NXOpen.VisualReporting.VisualReport is not activated.

-------------------------------------

Getter Method

Signature UnmatchedGroupLabel

Returns:
Return type:NXOpen.VisualReporting.GroupLabel

New in version NX7.0.0.

License requirements: None.

UnmatchedResultCategory

VisualReport.UnmatchedResultCategory

Returns the NXOpen.VisualReporting.UnmatchedResultCategory from the activated NXOpen.VisualReporting.VisualReport.

It will return None if the NXOpen.VisualReporting.VisualReport is not activated.

-------------------------------------

Getter Method

Signature UnmatchedResultCategory

Returns:
Return type:NXOpen.VisualReporting.UnmatchedResultCategory

New in version NX8.0.0.

License requirements: None.

Method Detail

FindObject

VisualReport.FindObject

Finds the NXOpen.NXObject with the given identifier as recorded in a journal.

An object may not return the same value as its JournalIdentifier in different versions of the software. However newer versions of the software should find the same object when FindObject is passed older versions of its journal identifier. In general, this method should not be used in handwritten code and exists to support record and playback of journals.

An exception will be thrown if no object can be found with the given journal identifier.

Signature FindObject(journalIdentifier)

Parameters:journalIdentifier (str) – Journal identifier of the object
Returns:
Return type:NXOpen.INXObject

New in version NX3.0.0.

License requirements: None.

GetAllDefinedProperties

VisualReport.GetAllDefinedProperties

Returns the NXOpen.VisualReporting.Property`s which has been defined in this :py:class:`NXOpen.VisualReporting.VisualReport.

The returned properties include those properties defined in :py:class:`NXOpen.VisualReporting.Condition`s, in :py:class:`NXOpen.VisualReporting.Classifier`s, and in the referenced properties.

Signature GetAllDefinedProperties()

Returns:Properties defined in this visual report
Return type:list of NXOpen.VisualReporting.Property

New in version NX8.0.0.

License requirements: None.

GetGroupLabels

VisualReport.GetGroupLabels

Returns the result NXOpen.VisualReporting.GroupLabel`s from the activated :py:class:`NXOpen.VisualReporting.VisualReport.

There are no NXOpen.VisualReporting.GroupLabel`s if the :py:class:`NXOpen.VisualReporting.VisualReport is not activated. You can acess the user defined NXOpen.VisualReporting.GroupLabel`s by :py:meth:`NXOpen.VisualReporting.VisualReportBuilder.GetManualGroupLabelsOfRule.

Signature GetGroupLabels()

Returns:
Return type:list of NXOpen.VisualReporting.GroupLabel

New in version NX7.0.0.

License requirements: None.

GetGroupLabelsOfResultCategory

VisualReport.GetGroupLabelsOfResultCategory

Returns the result NXOpen.VisualReporting.GroupLabel`s of a :py:class:`NXOpen.VisualReporting.ResultCategory from the activated NXOpen.VisualReporting.VisualReport.

Signature GetGroupLabelsOfResultCategory(category)

Parameters:category (NXOpen.VisualReporting.ResultCategory) –
Returns:
Return type:list of NXOpen.VisualReporting.GroupLabel

New in version NX8.0.0.

License requirements: None.

GetKeywords

VisualReport.GetKeywords

Gets a comma separated string of the keywords for this NXOpen.VisualReporting.VisualReport.

Signature GetKeywords()

Returns:
Return type:str

New in version NX7.5.0.

License requirements: None.

GetObjectTypes

VisualReport.GetObjectTypes

Returns the NXOpen.VisualReporting.VisualReportObjectTypeOption`s of this :py:class:`NXOpen.VisualReporting.VisualReport.

Only valid if the NXOpen.VisualReporting.VisualReport.ScopeType() of the NXOpen.VisualReporting.VisualReport is NXOpen.VisualReporting.VisualReportScopeTypeOption.SubPart type.

Signature GetObjectTypes()

Returns:The object types
Return type:list of NXOpen.VisualReporting.VisualReportObjectTypeOption

New in version NX9.0.0.

License requirements: None.

GetObjectsInGroup

VisualReport.GetObjectsInGroup

Returns the NXOpen.NXObject`s that belong to the group with this :py:class:`NXOpen.VisualReporting.GroupLabel.

Signature GetObjectsInGroup(groupLabel)

Parameters:groupLabel (NXOpen.VisualReporting.GroupLabel) – A group label of this visual report
Returns:
Return type:list of NXOpen.NXObject

New in version NX7.0.0.

License requirements: None.

GetPropertyValueOfObject

VisualReport.GetPropertyValueOfObject

Returns the value of the NXOpen.VisualReporting.Property`s for the :py:class:`NXOpen.NXObject in the result NXOpen.VisualReporting.GroupLabel.

It will return None if the NXOpen.VisualReporting.VisualReport is not activated, or the NXOpen.VisualReporting.Property does not belong to the properties defined in this NXOpen.VisualReporting.VisualReport, or the NXOpen.NXObject doesn’t belong to the specified result NXOpen.VisualReporting.GroupLabel.

Signature GetPropertyValueOfObject(property, groupLabel, nxObject)

Parameters:
Returns:

Return type:

str

New in version NX8.0.0.

License requirements: None.

GetResultCategories

VisualReport.GetResultCategories

Returns the NXOpen.VisualReporting.ResultCategory`s from the activated :py:class:`NXOpen.VisualReporting.VisualReport.

There are no NXOpen.VisualReporting.ResultCategory`s if the :py:class:`NXOpen.VisualReporting.VisualReport is not activated.

Signature GetResultCategories()

Returns:
Return type:list of NXOpen.VisualReporting.ResultCategory

New in version NX8.0.0.

License requirements: None.

GetRule

VisualReport.GetRule

Return the specified NXOpen.VisualReporting.Rule from this NXOpen.VisualReporting.VisualReport

Signature GetRule(index)

Parameters:index (int) – The index of the returned NXOpen.VisualReporting.Rule.
Returns:
Return type:NXOpen.VisualReporting.Rule

New in version NX7.0.0.

License requirements: None.

GetRules

VisualReport.GetRules

Returns all the NXOpen.VisualReporting.Rule`s in this :py:class:`NXOpen.VisualReporting.VisualReport

Signature GetRules()

Returns:
Return type:list of NXOpen.VisualReporting.Rule

New in version NX7.0.0.

License requirements: None.

Print

VisualReport.Print

Prints a representation of this object to the system log file.

Signature Print()

New in version NX3.0.0.

License requirements: None.

RemoveResultCategory

VisualReport.RemoveResultCategory

Removes the NXOpen.VisualReporting.ResultCategory from NXOpen.VisualReporting.VisualReport.

The NXOpen.VisualReporting.Classifier which populates this NXOpen.VisualReporting.ResultCategory will also be removed from the NXOpen.VisualReporting.Rule in the NXOpen.VisualReporting.VisualReport.

Signature RemoveResultCategory(theCategory)

Parameters:theCategory (NXOpen.VisualReporting.ResultCategory) –

New in version NX8.0.0.

License requirements: nx_visual_reporting (“Visual Reporting”)

Save

VisualReport.Save

Saves this NXOpen.VisualReporting.VisualReport to its current NXOpen.VisualReporting.VisualReport.Filename().

Note that when NX is connected to Teamcenter, the NXOpen.VisualReporting.VisualReport.Filename() will be updated to the report dataset identifier after the report is saved to Teamcenter database.

Signature Save()

New in version NX7.0.0.

License requirements: nx_visual_reporting (“Visual Reporting”)

SetKeywords

VisualReport.SetKeywords

Sets a comma separated string of the keywords for this NXOpen.VisualReporting.VisualReport.

Signature SetKeywords(keywords)

Parameters:keywords (str) –

New in version NX8.0.0.

License requirements: nx_visual_reporting (“Visual Reporting”)

SetName

VisualReport.SetName

Sets the custom name of the object.

NOTE: This method should not be used to edit a read-only object such as a Mirrored PMI object. If it is, the changes will be overridden when the part is updated.

Signature SetName(name)

Parameters:name (str) –

New in version NX3.0.0.

License requirements: None.