make_list
make_list{d_setObj|d_ctuObjRef}
Description
Constructs a Tcl list of object identifiers from the given set of objects or from the reference to a list of objects. If no argument is given, the Tcl list for the objects in the selected set is returned.
This command is useful for inspecting properties with the inspect_prop command.
The shorthand version of this command, ml, can also be used.
Arguments
Value Returned
Examples
The following table includes usage examples for make_list.
Example—Finding Items in a Set
This procedure outputs the type property for all elements in the given set.
proc findItemsInSet {inputSet} {
set instSet [create_set]
foreach inputObject [ml $inputSet] {
puts [ip type $inputObject]
}
puts "[set_count -set $inputSet] items in set."
}
The following example uses the findItemsInSet procedure and shows the output.
findItemsInSet [get_selection_set]
ctuRouteSegment
ctuRouteVia
ctuNet
ctuRoute
4 items in set.
Example—Create a Set Containing Instances Attached to Nets in a Set
This procedure returns a set of instances that are attached to nets in the given set.
proc findInstancesConnectedToNets {inputSet} {
set instSet [create_set]
foreach inputObject [ml $inputSet] {
set inputObjectType [ip type $inputObject]
if {[string compare $inputObjectType "ctuNet"] == 0} {
foreach element [ml [ip elements $inputObject]] {
set elementType [ip type $element]
if {[string compare $elementType "ctuInstTerm"] == 0} {
set elementInst [ip instance $element]
add_object_to_set -object $elementInst -set $instSet
}
}
} else { puts "$inputObjectType: this is not a net" }
}
puts "[set_count -set $instSet] instances are attached to selected nets."
return $instSet
}
The following example uses the findInstancesConnectedToNets procedure and adds the instances that are found to the current highlight set.
replace_set -set1 [findInstancesConnectedToNets [get_selection_set]] -set2 [get_current_highlight]
Related Topics
Return to top