Is there a faster method of setting the Entity Domain of an Entity? By faster I mean faster than opening the Entity Specification dialog for each Entity, go to General tab and click±select the Domain combo-box.
We are sorry that mass assignment of entity domain is not yet support.
It will be support in future release.
We will notify you when it is supported.
Thank you very much for your response. Is there a public roadmap of planned features available?
What you could do is to set up a “master entity” and then copying that as a new model element instead of creating new views. This would create a new entity with the same domain as you configured earlier so you wouldn’t have to edit this particular setting. Obviously the same applies to every other setting to made.
By default Visual Paradigm will create a new view if you use a copy/paste method. So you’d end up with a new “virtual copy” (an auxiliary view) of the same entity. However, if you right click on the canvas and then use “Paste Model Element” you’ll create a whole new (and separate!) model element, yet based on what you copied.
It has its limitations of course but I could well image that this could be faster than having to manually set everything yourself. Maybe food for thought?
Hope this can help!
Yes, that would do if I were creating new entities. Using the Duplicate hotkey (Ctrl+E by default if I recall correctly) would also work and it’s marginally faster if the destination is the same diagram. But, Entity Domains can work just like that: they can function as “master entity templates” you can edit further after making a separate copy of them, eg. by drag-n-dropping them from Model Explorer > Database Domains > Entity Domains. That creates a new Entity with all the pre-set properties of the Entity Domain, without the unwanted side-effect of a “master entity” (namely that if it’s in a Physical Model, it will be generated as a table).
However, I’m not creating new Entities. I’m transiting them from a Logical Model to a Physical Model and there are some extra Columns and Constraints that are not common in all Physical Models the Logical Models are transited into. Setting the Domain of the Entity does the job perfectly and is exactly what I need. I just need it a bit faster
I’m thinking about setting up some macros to hasten things up a little bit. Hmm Does VP have built-in macro handling or do I have to look for some 3rd party solution?
Now I fully understand what you’re trying to do here. There might be way to automate this and thus making things faster but from a first glimpse I think it could get a little tricky to set up.
VP has no support for macro’s (keyboard recording) but it does provide something a bit more extensive to customize its behavior: plugins. It provides the so called OpenAPI which allows you to write plugins using Java which can then be used to automate tasks within the system.
It is a very powerful way of working but can also be hard to get started with, also because the Plugin API isn’t fully documented. You can still learn a lot from the Javadoc, but sometimes you will run into oddities because not everything is commented / documented. (the classic ‘everything is easy once you know how it works’ ).
Anyway, if you wish to rely on “VP solutions” then this is probably your best option. You can find a good overview of documentation (including the OpenAPI) here. If you’re going to look into this deeper then definitely check out VP’s Know How website; this is a must read (and follow) if you’re interested in working with the OpenAPI. Their examples are outstanding and really have taught me a lot about plugin programming.
Maybe food for thought?
… reminds me of a small debug project I had planned. Won’t be of any direct help here, but if I do manage to finish that in a short time I’ll post here as well, because it should definitely help identify those weird models and shapes in a diagram
Well, this sounds interesting. And though it’s definitely not my intention, I can see myself eventually end up trying to beat that OpenAPI into submission. My only problem is that I’ve “evolved” from being a programmer quite a long time ago
I haven’t done anything Java in the last 15 years or so
Anyway, thanks for the hints!
Okay, this is pretty much entirely out of my reach I know what I want and I have a vague conjecture what to do to get it. I’ve got absolutely no idea how to do it, though. The help only has tree and index which might be of a help if one knows what one’s looking for, but it does not have search and I’m completely in the darkness.
I want to speed up the process of modifying Entity Domain setting for ERD Entities. The best(?)/fastest way of doing that is adding a submenu to the context menu of Entity, which contains the possible Entity Domains, something similar how stereotypes are added.
Hmm Is that even possible using OpenAPI? I mean adding a submenu to the context menu and loading it on the fly with items that can be checked.
For now, let’s suppose it is. I guess I’d need to create a plugin that has a class which implements com.vp.plugin.action.VPContextActionController.
I still don’t know tons of things:
- where to look for the list of Domain Entities
- how to fetch them
- how to force them into a submenu (I guess this will have to something with the update method of VPContextActionController but not very sure about it)
- how to make the context menu only show for Entity type diagram objects (perhaps
- how to get the Entity currently selected
- and how to set its Entity Domain property to the chosen one
ShelLuser, would you mind wasting some more of your time to help me out here?
I’m not so familiar with open API, but I tried to see how to achieve what you want.
Yes, ShelLuser is right that in open API an Entity is represented by an IDBTable. But I do a quick test using code completion in Java IDE, and I find that IDBTable hasn’t exposed the set/get of domain. If this is true that we need to update open API to expose those methods first. Anyway I’ll need to confirmed this with my colleagues, let me get back to you when there is any news, thanks.
Thank you very much, I’m eagerly awaiting!
Yeah, agreed with your ideas but I don’t really see it happening this way with OpenAPI because although you can control a lot it does have its limitations. However, there should be other possibilities. Now, keep in mind that I’m now theorizing based on the concept of actually having this kind of access (I also read Antony’s post )…
But I could imagine a menu option “Update ERD domain”. If you click it and you haven’t specified the domain to set then a dialog would open which allows you to select the domain you wish to set. But if you click it whilst having a model element selected it would then change the domain for that selected model element. Or multiple of course.
That should be doable. Obviously there will be some caveats to work out, like the ability to change the selected domain at a later time, but that’s for later.
In the mean time I re-configured / updated VP for NetBeans usage, so I can once again work on a project and a project design simultaneously, that should help. I’m going to think about the design a bit and set up a basic foundation for this plugin.
Reminds me of a tutorial I never really finished, I’ll see if I can pick that up again soonish.
Not at all, could be fun.
First I’m going to get my last project sorted out (at least into a usable “beta stage”); an API explorer. I have some ideas, but the main function right now is to iterate over all the model elements in the currently active diagram and then mention their classes and other information which can be easily collected. That should help identify a few things.
(edit) One important detail though: There’s currently a heatwave raging in the Netherlands and that is having its effects on me, I hardly spend as much time behind my PC as I normally do. Even so, I am slowly making some progress.
Thank you very much! Though I’m afraid I might never bring this to the I’m getting old and my programming skills are failing
Regarding this exact issue, I’d suggest not spending more time trying to solving it. Roy Keung also said that this will be supported in the (hopefully not so distant) future.
If there was everything ready to implement a quick solution I’d consider pursuing this matter further, but
tells me that the requirements for making it possible are probably not met yet anyway.
I’m always eager to learn something new but I wouldn’t want to waste valuable resources (in this case that would be your time) without any signs of a significant possible gain. Unless, of course, you would make this use case a subject of another tutorial waiting to be finished
I would like to let you know our engineers had deployed a new build which now exposed the get/set method for domain on entity. Please update the software to latest patch build (20180720bc or later) to get this enhancement. Details about update to latest patch can be found at
- Please make sure you have pressed the “Update to latest patch” button on the left hand side of the dialog right after launching the update program
Feel free to contact me if you require any further information.