VisualReport Class¶
-
class
NXOpen.VisualReporting.VisualReport¶ Bases:
NXOpen.NXObjectA visual report can be activated by the
NXOpen.VisualReporting.VisualReportManagerto 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()andNXOpen.VisualReporting.VisualReport.GetObjectsInGroup().New in version NX7.0.0.
Properties¶
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 |
| 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. |
Enumerations¶
| VisualReportObjectTypeOption Enumeration | Represents the possible report object type options for a NXOpen.VisualReporting.VisualReport. |
| VisualReportReportContextOption Enumeration | Represents the possible NXOpen.VisualReporting.VisualReport.ReportContext() options for a NXOpen.VisualReporting.VisualReport. |
| VisualReportReportingObjectTypeOption Enumeration | Represents the possible NXOpen.VisualReporting.VisualReport.ReportingObjectType() for a NXOpen.VisualReporting.VisualReport. |
| VisualReportReportingStyleOption Enumeration | Represents the possible NXOpen.VisualReporting.VisualReport.ReportingStyle() for a NXOpen.VisualReporting.VisualReport. |
| VisualReportSaveDestinationOption Enumeration | Represents the possible NXOpen.VisualReporting.VisualReport.SaveDestination() options for a NXOpen.VisualReporting.VisualReport. |
| VisualReportScopeTypeOption Enumeration | Represents the possible NXOpen.VisualReporting.VisualReport.ScopeType() options for a NXOpen.VisualReporting.VisualReport. |
Property Detail¶
BitmapName¶
-
VisualReport.BitmapName¶ Returns or sets the bitmap name of this
NXOpen.VisualReporting.VisualReport.-------------------------------------Getter Method
Signature
BitmapNameReturns: Return type: str New in version NX8.0.0.
License requirements: None.
-------------------------------------Setter Method
Signature
BitmapNameParameters: 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
CustomMessageReturns: Return type: str New in version NX8.0.0.
License requirements: None.
-------------------------------------Setter Method
Signature
CustomMessageParameters: 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
DescriptionReturns: Return type: str New in version NX7.0.0.
License requirements: None.
-------------------------------------Setter Method
Signature
DescriptionParameters: 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
DescriptiveCategoryReturns: Return type: str New in version NX7.5.0.
License requirements: None.
-------------------------------------Setter Method
Signature
DescriptiveCategoryParameters: 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.VisualReportto 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
DestinationTeamcenterFolderReturns: The Teamcenter folder name Return type: str New in version NX8.0.0.
License requirements: None.
-------------------------------------Setter Method
Signature
DestinationTeamcenterFolderParameters: 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.VisualReportwas 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
FilenameReturns: Return type: str New in version NX7.0.0.
License requirements: None.
-------------------------------------Setter Method
Signature
FilenameParameters: 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
IsOccurrenceReturns: 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
IsUnmatchedGroupEnabledReturns: Whether the unmatched group is enabled Return type: bool New in version NX7.0.0.
License requirements: None.
-------------------------------------Setter Method
Signature
IsUnmatchedGroupEnabledParameters: 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
JournalIdentifierReturns: 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
NameReturns: 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
OwningComponentReturns: Return type: NXOpen.Assemblies.ComponentNew in version NX3.0.0.
License requirements: None.
OwningPart¶
-
VisualReport.OwningPart¶ Returns the owning part of this object
-------------------------------------Getter Method
Signature
OwningPartReturns: The owning part of this object or null if it does not have an owner Return type: NXOpen.BasePartNew 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
PrototypeReturns: The prototype of this object or null if this object is not an occurrence Return type: NXOpen.INXObjectNew in version NX3.0.0.
License requirements: None.
ReportContext¶
-
VisualReport.ReportContext¶ Returns or sets the
NXOpen.VisualReporting.VisualReportReportContextOptionof thisNXOpen.VisualReporting.VisualReport.-------------------------------------Getter Method
Signature
ReportContextReturns: Return type: NXOpen.VisualReporting.VisualReportReportContextOptionNew in version NX9.0.0.
License requirements: None.
-------------------------------------Setter Method
Signature
ReportContextParameters: 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.VisualReportReportingObjectTypeOptionof thisNXOpen.VisualReporting.VisualReport.Only valid if the
NXOpen.VisualReporting.VisualReport.ScopeType()of theNXOpen.VisualReporting.VisualReportisNXOpen.VisualReporting.VisualReportScopeTypeOption.Componenttype.-------------------------------------Getter Method
Signature
ReportingObjectTypeReturns: Return type: NXOpen.VisualReporting.VisualReportReportingObjectTypeOptionNew in version NX8.0.0.
License requirements: None.
-------------------------------------Setter Method
Signature
ReportingObjectTypeParameters: 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.VisualReportReportingStyleOptionof thisNXOpen.VisualReporting.VisualReport.-------------------------------------Getter Method
Signature
ReportingStyleReturns: Return type: NXOpen.VisualReporting.VisualReportReportingStyleOptionNew in version NX7.0.0.
License requirements: None.
-------------------------------------Setter Method
Signature
ReportingStyleParameters: 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.VisualReportSaveDestinationOptionof theNXOpen.VisualReporting.VisualReport.Note that this property will always be
NXOpen.VisualReporting.VisualReportSaveDestinationOption.Localwhen NX is not connected to Teamcenter.-------------------------------------Getter Method
Signature
SaveDestinationReturns: The destination option Return type: NXOpen.VisualReporting.VisualReportSaveDestinationOptionNew in version NX8.0.0.
License requirements: None.
-------------------------------------Setter Method
Signature
SaveDestinationParameters: destinationOption ( NXOpen.VisualReporting.VisualReportSaveDestinationOption) – The destination optionNew in version NX8.0.0.
License requirements: nx_visual_reporting (“Visual Reporting”)
ScopeType¶
-
VisualReport.ScopeType¶ Returns the
NXOpen.VisualReporting.VisualReportScopeTypeOptionof thisNXOpen.VisualReporting.VisualReport.-------------------------------------Getter Method
Signature
ScopeTypeReturns: Return type: NXOpen.VisualReporting.VisualReportScopeTypeOptionNew in version NX9.0.0.
License requirements: None.
UnmatchedGroupLabel¶
-
VisualReport.UnmatchedGroupLabel¶ Returns the
NXOpen.VisualReporting.GroupLabelwhich is used for unmatched object.It will return None if the
NXOpen.VisualReporting.VisualReportis not activated.-------------------------------------Getter Method
Signature
UnmatchedGroupLabelReturns: Return type: NXOpen.VisualReporting.GroupLabelNew in version NX7.0.0.
License requirements: None.
UnmatchedResultCategory¶
-
VisualReport.UnmatchedResultCategory¶ Returns the
NXOpen.VisualReporting.UnmatchedResultCategoryfrom the activatedNXOpen.VisualReporting.VisualReport.It will return None if the
NXOpen.VisualReporting.VisualReportis not activated.-------------------------------------Getter Method
Signature
UnmatchedResultCategoryReturns: Return type: NXOpen.VisualReporting.UnmatchedResultCategoryNew in version NX8.0.0.
License requirements: None.
Method Detail¶
FindObject¶
-
VisualReport.FindObject¶ Finds the
NXOpen.NXObjectwith 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.INXObjectNew 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.PropertyNew 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.VisualReportis not activated. You can acess the user definedNXOpen.VisualReporting.GroupLabel`s by :py:meth:`NXOpen.VisualReporting.VisualReportBuilder.GetManualGroupLabelsOfRule.Signature
GetGroupLabels()Returns: Return type: list of NXOpen.VisualReporting.GroupLabelNew in version NX7.0.0.
License requirements: None.
GetGroupLabelsOfResultCategory¶
-
VisualReport.GetGroupLabelsOfResultCategory¶ Returns the result
NXOpen.VisualReporting.GroupLabel`s of a :py:class:`NXOpen.VisualReporting.ResultCategoryfrom the activatedNXOpen.VisualReporting.VisualReport.Signature
GetGroupLabelsOfResultCategory(category)Parameters: category ( NXOpen.VisualReporting.ResultCategory) –Returns: Return type: list of NXOpen.VisualReporting.GroupLabelNew 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 theNXOpen.VisualReporting.VisualReportisNXOpen.VisualReporting.VisualReportScopeTypeOption.SubParttype.Signature
GetObjectTypes()Returns: The object types Return type: list of NXOpen.VisualReporting.VisualReportObjectTypeOptionNew 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 reportReturns: Return type: list of NXOpen.NXObjectNew 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.NXObjectin the resultNXOpen.VisualReporting.GroupLabel.It will return None if the
NXOpen.VisualReporting.VisualReportis not activated, or theNXOpen.VisualReporting.Propertydoes not belong to the properties defined in thisNXOpen.VisualReporting.VisualReport, or theNXOpen.NXObjectdoesn’t belong to the specified resultNXOpen.VisualReporting.GroupLabel.Signature
GetPropertyValueOfObject(property, groupLabel, nxObject)Parameters: - property (
NXOpen.VisualReporting.Property) – A property defined in this visual report - groupLabel (
NXOpen.VisualReporting.GroupLabel) – A result group of this visual report - nxObject (
NXOpen.NXObject) – ANXOpen.NXObjectwhich belongs to the result group
Returns: Return type: str
New in version NX8.0.0.
License requirements: None.
- property (
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.VisualReportis not activated.Signature
GetResultCategories()Returns: Return type: list of NXOpen.VisualReporting.ResultCategoryNew in version NX8.0.0.
License requirements: None.
GetRule¶
-
VisualReport.GetRule¶ Return the specified
NXOpen.VisualReporting.Rulefrom thisNXOpen.VisualReporting.VisualReportSignature
GetRule(index)Parameters: index (int) – The index of the returned NXOpen.VisualReporting.Rule.Returns: Return type: NXOpen.VisualReporting.RuleNew in version NX7.0.0.
License requirements: None.
GetRules¶
-
VisualReport.GetRules¶ Returns all the
NXOpen.VisualReporting.Rule`s in this :py:class:`NXOpen.VisualReporting.VisualReportSignature
GetRules()Returns: Return type: list of NXOpen.VisualReporting.RuleNew 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.ResultCategoryfromNXOpen.VisualReporting.VisualReport.The
NXOpen.VisualReporting.Classifierwhich populates thisNXOpen.VisualReporting.ResultCategorywill also be removed from theNXOpen.VisualReporting.Rulein theNXOpen.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.VisualReportto its currentNXOpen.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.