It looks like you're new here. If you want to get involved, click one of these buttons!
Well it seems I answered my own question
Now to Combine the GUI
#Gui to Access Top level Text and Layers
#Tracy Groller 1/14/2021
#Need Combine the Gui
ly = RBA::CellView.active.layout
cell = RBA::CellView.active.cell
#Parse Layers
layers = ly.layer_indexes.collect { |li| info = ly.get_info(li); [ info.layer, info.datatype, li ] }.sort
#initialize arrays
in_lyp = []
nets = []
#parse Layers and Text at The Top Level
layers.each do |layer,datatype,li|
if ! cell.bbox_per_layer(li).empty?
in_lyp << layer.to_s
layer_info = LayerInfo.new(layer,0)
layer_index = ly.layer(layer_info)
cell.each_shape(layer_index) do |shape|
if shape.is_text?
text_obj = shape.text
string = text_obj.string
nets << string
end
end
end
end
#need to Combine the GUI
value = RBA::InputDialog::ask_item("Top Level Text", "Select Text:", nets, 2)
net = RBA::InputDialog::ask_item("Layer", "Select Layer:",in_lyp, 1)
puts "Text Selected = #{value}"
puts "Layer Selected = #{net}"
Comments
I answered some of your questions in the other posts. Maybe these help.
Sorry for the delay. I'm kind of busy.
Matthias
Gotcha and thanks