Author Topic: Fast creation of User Data from the Data panel  (Read 187 times)

marcgwm

  • Posts: 11
    • View Profile
Fast creation of User Data from the Data panel
« on: December 06, 2016, 06:06:41 pm »
When building a new model (.FEM) following a well-established workflow, especially when custom plugins are involved in the simulations to be done soon after, we often need to create several User Data distributions.

I know there may be ways to do it with Python, but I'd prefer (like many other users, I think) to do this task from the GUI. The main reason is that the tools you've developed in the GUI for importing data from maps are very handy. Once combined with "Import Map Reference(s)", or even "Quick Import" for the standard model components, that makes a model build workflow quite fast!

But one of the slow steps remaining is the insertion of new User Data distributions.

My feature suggestion is the following: Could you add a menu item to the contextual menu for "User Data", in the Data panel, which could be named "Add Several Nodal Distributions" and "Add Several Elemental Distributions", for instance? Clicking these items would show a window with a small multi-line text editor, where we can either write directly the names, or import them from the clipboard (You could even add a button for it: "Paste names from clipboard). You could add a validation step before the "OK" or "Create" button effectively performs its action, to ensure the names do not contain any unauthorized character. (You may even show little icons next to the text editor with green checkmark (valid) or red cross (invalid) to inform the user in real-time.
   To make the development easier and faster from your side, you could implement just one new menu item, and one window containing a text editor for typing the names AND a two-choice "radio button" for choosing between Creating "Nodal" or "Elemental" distributions.

Hope you can implement this feature soon. It would not conflict with any existing feature, and it will make my model-building workflow much more efficient!
The general objective of this feature is, as you've surely guess, to avoid repetitive tasks whenever possible, even in a GUI-based workflow.

Thanks for considering it, and have a nice week!

Marc

Björn Kaiser

  • Posts: 435
    • View Profile
Re: Fast creation of User Data from the Data panel
« Reply #1 on: December 15, 2016, 04:27:36 pm »
Thanks for the hint.

You are right. Distributions can be created within a loop by using the following API functions:


#include <ifm/document.h>

long IfmCreateElementalRefDistr
(
   IfmDocument pDoc,
   const char *name
);

and

#include <ifm/document.h>

long IfmCreateNodalRefDistr
(
   IfmDocument pDoc,
   const char *name
);


As you correctly indicated such a function within the GUI does not exist. Accordingly, I added your suggestion to our wish list.

marcgwm

  • Posts: 11
    • View Profile
Re: Fast creation of User Data from the Data panel
« Reply #2 on: December 16, 2016, 01:56:14 am »
Great! Thanks for your answer.
I hope that new functionality will effectively appear in the GUI, someday :-)
Bye.

Marc