Any way to create a Relation via a command?

Is there any way to create a relation via a command?

I have a large schema: 200+ tables.
4D’s way to create relationships is very cumbersome: the interface is not too good.

I’d love to write my own interface to select the two fields, then issue a command to create a relationship - if there were a command.


yes, i really need a new command for this or a new structure editor.

However, the only way i figured out is IMPORT STRUCTURE.

I’d like it too. I don’t know how to create a relation (more exactly, I know with SQL but the resulting relation does not seem to be well supported in 4D). I’ve used component> that selects the N field of an existing relation (double clic), then I have to rename the relations (n to 1, 1 to N) with the palette - not fast but I had to do it once and it’s easier than searching the right noodle in the dish.

I wonder if this will be possible once 4D Projects are done, and we can just edit a file.