I’d like to know if OmniJS will eventually be able to power a graphic symbol (group) when it is being manipulated on the canvas. E.g., I would like to create symbols (groups) with specific connection points that permit connections from specific lines or other symbols. The idea is to be able to create simple block schematics that, when drawing, ensure wrong connections cannot be made (powered by my own OmniJS written logic).
I guess this would mean that code is attached to symbols, that symbols+code can live in a library and can be dragged onto the canvas and that the code is activated while the symbol is actively manipulated or connected to while on the canvas.
Kinda like, dare I say it, Visio ?
Is this in the pipe line guys/gals or… not at all?
We have actions which allow you to run an Automation Action when tapping on a graphic from a plug-in. More information on Plug-Ins at https://omni-automation.com/plugins/index.html. We also have stencils which can be saved with specific magnets and actions on them, and then accessed by your actions. Please let us know if there is a bug or something missing that is getting in your way of accomplishing this with stencils, Plug-Ins, and Actions on graphics. I am not sure how to add an action based on “connecting to” a shape though, so that part might be a feature request or something you would need to build logic for (to identify which graphics should be clicked to trigger their action when they are connected to).
This is the area in the Properties Inspector where you set up which Action from the Plug-In should be triggered.
It sounds like a cool project idea! Feel free to reach out to us via email (Contact Omni under the Help Menu) if you see any unexpected issues or have requests for capabilities you’d like to script.
I am familiar with the action when tapping on a graphic but not with the “specific magnets and actions on them”. Can you elaborate? i.e., does the action run when a connection to the magnet is made (or a connection is removed)? Code examples anywhere? I have Sal’s but that does not seem to use those magnet actions…
There are not magnet actions, I meant that you can set which magnets are on each graphic in the application in the Connections area of the Properties inspector and reuse those from a stencil file. The actions apply only to the entire graphic. I was hoping you can use magnets and line options in a stencil to limit the paths because the actions apply to the entire graphic.
If you check out https://omni-automation.com/omnigraffle/graphics-02.html it says the magnet dropdown isn’t currently scriptable. That is why may want to set up a stencil, then place a graphic with the magnets and connection settings that you want onto the Canvas to manipulate it.