get_values(...) - get_values(...) - 2026.1 English - UG1781

Python Scripting Guide for PDM Tool (UG1781)

Document_ID
UG1781
Release_Date
2026-06-23
Version
2026.1 English
Revision

Description

Get dictionary of specified record names mapped to dictionaries of specified field names to value mappings.

Syntax

get_values([<field_names>], [<record_names>], writable_only=False, invalid_only=False)

Returns

Dictionary in a format {record: {field: value, ...}, ...}.

Parameters

Name Description
[<field_names>] List of field names.

Default: All fields

[<record_names>] List of record names.

Default: All available record names

[writable_only] Enables returning only writable field values if True, otherwise, read-only fields are also returned.

Default: False

[invalid_only] Enables returning only invalid field values if True, otherwise, field values are returned regardless of their validity.

Default: False

Examples

# Get all values of a resource
proj = open_project('my_design.pdm')
io_config = proj.get_block('io').get_resource('io_config')
values = io_config.get_values()
# values == {'io_inst1': {'io_type': 'XP', 'io_standard': 'LVCMOS 1.5V 12mA', 'input_pins': 1, ...}, ...}
# Get only writable field values
writable_values = io_config.get_values(writable_only=True)
# Get values for specific fields and records
values = io_config.get_values(['io_type', 'io_standard'], ['io_inst1'])
# Get only invalid writable values
invalid_values = io_config.get_values(invalid_only=True)