MySQL Forums
Forum List  »  MySQL Workbench

Re: MySQL Workbench Scripting Problem
Posted by: Alfredo Kengi Kojima
Date: September 04, 2013 11:52AM

Hi Jim

Try this as a starting point for setting colors:

diagram = grt.root.wb.doc.physicalModels[0].diagrams[0]
for figure in diagram.figures:
if figure.name.startswith("tbl_c"):
figure.color = "#ff0088"

For turning relationships 1:1:
diagram = grt.root.wb.doc.physicalModels[0].diagrams[0]
for rel in diagram.connections:
rel.foreignKey.mandatory=1
rel.foreignKey.many=0

--
Alfredo Kojima
MySQL Developer Tools

Options: ReplyQuote


Subject
Views
Written By
Posted
870
September 01, 2013 12:02PM
Re: MySQL Workbench Scripting Problem
519
September 04, 2013 11:52AM
647
September 04, 2013 09:06PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.