It looks like you're new here. If you want to get involved, click one of these buttons!
I want to adjust all text size, rotation and alignment with a Ruby script.
The documentation indicates that size= , halign= , valign= should set the size and alignment of a text, so my script is :
include RBA app = RBA::Application.instance mw = app.main_window view = mw.current_view cv = view.cellview(view.active_cellview_index) ly = view.active_cellview.layout cl = view.active_cellview.cell dbu = ly.dbu layer_info = LayerInfo.new(127,0) layer_index = ly.layer(layer_info) cl.each_shape(layer_index) do |shape| if shape.is_text? text = shape.text text.size= 100*dbu text.halign= 1 text.valign= 1 text.trans= RBA::Trans::R90 print( text.string,",") end end view.update_content view.add_missing_layers #view.zoom_fit
But it does not set the size, alignment nor the rotation of the texts of the cell, although they are properly listed with the print command.
Please, can you tell me where is my mistake ?
Thank you, Best regards,