Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions doc/source/user_guide/tutorials/data_structures/data_arrays.rst
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,14 @@ You can also create a |Field|, |StringField| or |PropertyField| from scratch bas
# Set the data values
my_property_field.data = [12, 25]
# Set the location
my_property_field.location = dpf.locations.modal
# Set the element IDs
# For DPF 26R1 and above, directly set the location of the PropertyField
from ansys.dpf.core.check_version import meets_version
if meets_version(dpf.SERVER.version, "11.0"):
my_property_field.location = dpf.locations.modal
# For DPF older than 26R1, you must set the location with a Scoping
else:
my_property_field.scoping = dpf.Scoping(location=dpf.locations.modal)
# Set the mode IDs
my_property_field.scoping.ids = [1, 2]
# Print the property field
print(my_property_field)
Expand Down
Loading