Plot scale
#144
-
Hi, anyone know how i can get these values? |
Beta Was this translation helpful? Give feedback.
Answered by
CEXT-Dan
Dec 18, 2024
Replies: 2 comments 1 reply
-
Layout subclasses PlotSettings, that has method getCustomPrintScale import traceback
from pyrx_imp import Rx, Ge, Gi, Db, Ap, Ed
def PyRxCmd_doit1():
try:
db = Db.curDb()
ld = Db.Dictionary(db.layoutDictionaryId())
for name, id in ld.toDict().items():
layout = Db.Layout(id)
print(name, layout.getCustomPrintScale())
except Exception as err:
traceback.print_exception(err) |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
gswifort
-
I guess to set it, you have to use Db.PlotSettingsValidator import traceback
from pyrx_imp import Rx, Ge, Gi, Db, Ap, Ed
def PyRxCmd_doit2():
try:
db = Db.curDb()
ld = Db.Dictionary(db.layoutDictionaryId())
for name, id in ld.toDict().items():
if name != "Layout1":
continue
layout = Db.Layout(id,Db.OpenMode.kForWrite)
valatator = Db.PlotSettingsValidator()
valatator.setCustomPrintScale(layout,1,100.4)
print(name, layout.getCustomPrintScale())
except Exception as err:
traceback.print_exception(err) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Layout subclasses PlotSettings, that has method getCustomPrintScale
So maybe something like