Attributes commands#
NaxToView functions to create, import, and plot attributes in the active view.
- n2vscripting.attributes.create_attribute(name: str, att_type: Literal['Node', 'Element', 'ElementNodal'], formula: str) None #
Create a new attribute in the active view as a combination of other attributes.
- Parameters:
name (str) – The name of the attribute to create.
att_type (str) – The type of item the attribute applies to. Default is ‘Node’, other options are ‘Element’ and ‘ElementNodal’.
formula (str) – The formula used to define the attribute.
Examples
>>> n2v.create_attribute('MyAttribute', 'Node', '<attribute1> + <attribute2>')
- n2vscripting.attributes.create_attribute_from_contour() None #
Create an attribute from the current contour plot in the active view.
- n2vscripting.attributes.import_attributes(file_path: str) None #
Import attributes from a .csv file into the active view.
- Parameters:
file_path (str) – Path to the input .csv file
Examples
>>> n2v.import_attributes("C:/path/to/attributes.csv")
- n2vscripting.attributes.plot_attribute(name: str) None #
Plot the specified attribute as a contour in the active view.
- Parameters:
name (str) – The name of the attribute to plot.
Examples
>>> n2v.plot_attribute('MyAttribute')