Is there any way to copy diagrams into different projects? - staruml

Our team has been using starUML and we had to divide our job to draw sequence diagram for different parts. But now, I am having trouble how to merge those diagrams into one project.
I've searched on net and found out only package can be imported and exported.
Is there any way to just copy the sequence diagram and paste it in the original one?
They are sharing the same constants from the start.

You can copy-paste elements only one-by-one. But you should work with Model Elements. Review please, first method works for me, but the second
Procedure for Copying and Pasting View Elements in Diagram
unfortunately doesn't.
ADDED
Also you can Export - Import entire diagram as XMI
Here is bug-report.

Open your source & destination projects in an editor such as Visual Studio Code to view them as json formatted text.
In our source project json text locate the diagram name which should have an array below it called "ownedElements" (which contains all the items in the diagram).
"name": "My Diagram Name",
"ownedElements": [
...
]
Copy the name & array, then paste in the destination json, making sure it is inside of the Project Level "ownedElements" array.
NOTE: Items in an "ownedElements" array MUST be separated by a comma so dont forget to include these before and after you paste your text if they are needed.

in the model explorer view, you can copy a model, then open another star uml with your other project and in the model explorer view, you can now paste the model you have copied.

You can export / import fragments, which are items in the model (in file menu, version 2.5)

You can do so from the Model Explorer on the right by copying the Model.

Copy whole model and paste it into other model. Then delete unwanted elements.

Yes, We can copy and paste the diagram with the help of save As... option.
Please find steps as below:
1. create any type of diagram in StarUML and save it. example: sequence1.mdj
2. Then select File >> save As... option or also you can use short cut keys ctrl + shift + S and save it with different name. For example : sequence2.mdj
3. So now you have 2 different-different files (.mdj). you can modify as you want.
Note: If you simply copy and paste the file then it won't copy content in the second file. This, I already tried. It doesn't work.

you can make select all ctrl+a and past it in paint as image file and start working with it

Related

PowerBI: Importing data from mixed folder files

I got a question related to the importing different files from the folder into Power Query (Power BI). When I say different, in my case are .xslx and .txt files. Actually just one text file but it is important to be inside report. Excel files are and will be always consistent as it is shown down in a first picture only with date as a dynamic part, but inside are consistently structured, so I just have to put it into folder and hit refresh into Power Query and magic.. that works fine, but I got also that .txt file which has completely different information but still connected to the report (because there is a field of date/time inside with additional information). My question is how or what is good approach to have all these files inside one or more queries?
As you can see on the second picture (from PQ editor) in the content part on the last position is .txt file, which I "isolated" when right click on it and "Add as a new query", and then I need to do editing and so on. Is there maybe another approach to solve this? One problem I discovered is when I change path of the file, all queries are refreshed but not this one with .txt - even though I changed path completely in the Advanced editor. Simply gives an error. Has anyone idea how to deal with different files from one folder, assuming that you need all the files from inside?
If you do not want 2 folders, your approach for isolating the txt is appropriate. about refreshing issues: if you expanded the data by clicking combine, Excel must have created other queries and parameters ("Sample from....") you must change the path in those queries too.

How to have Excel to run VBA code saved in a text file?

Instead of having the VBA code saved in a module inside the Excel file, I would like to have the code saved in a text file, for example module1.vba. In Excel, module1.vba would be loaded or imported and run as it was a normal module.
Is that possible? How to do that?
In Excel, in the VBA editor, there is the option Insert > File... in the menu that does sort of what I want, but I don't know how to automate that with a minimal VBA code to load the real code saved as text.
Reason for this is to allow code revision control using text based applications like git.
--- edit ---
This answer shows a good alternative work around. However I'm still not too happy in duplicating things.
You can easily import a VBA file using a simple one-liner:
Application.VBE.ActiveVBProject.VBComponents.Import "C:\Path\To\File.bas"
This works with files exported from the VBA IDE, which include information like module name and other properties that can be configured on a per-module basis.
You need to enable Trust access to the VBA project object model for this to work. You can find that in the trust center settings, under Macro Settings.

Extend and include in file system

In our Software we want that the user to open a project file with different number of items (similar as in a Visual Studio Project) and he should be able to extract and insert these items from external sources (from other project, for example). I know the user should open projects, save projects, extract and insert items but, in terms of UML Use Case Diagrams, I don't know how to represent the three last user cases:
Either as extensions from the first one, that only exist after the first user story occurs.
Or representing the user case Open Project as an included Use case from the other three.
In the picture I have the two Use Case Diagrams. Are they both good?
Ask yourself: is Open Project a use case? What is the added value? I guess there is none at all. So if there is no added value, it is not a use case. And if it is no use case, you don't need a bubble.
I don't think either one of your solutions is correct.
The diagram with the extends indicates that we we might save a project while opening a project, which seems odd to me.
The diagram on the right says the inverse, while saving a project we also open a project. Again that seems wrong to me.
From my viewpoint these use cases all need to be separate use cases without an extend or include relation between them. They all seem to be somewhat on the same level. I can imagine that each of the use cases could be triggered by a single menu option.

How can I extract equations from docx files?

I want to write a program to retrieves equations (formulas) from .docx files. I am using open xml sdk, but I can't see how an equation is inserted in .docx files. An image (which represent the equation) is the only thing that I can find there. How can I extract equations from .docx files? Is that possible?
The previous answer was not responsive to the question!
If you examine the xml document tree and open the file document.xml, you will see something like the following:
<m:oMath><m:r><w:rPr><w:rFonts w:ascii="Cambria Math" w:hAnsi="Cambria Math"/></w:rPr><m:t>x= y</m:t>
(In the above example, the equation is "x=y". The tag indicates an equation.
You might be able to select the text in each equation editor object an copy it out to another document or something by following the VBA section in this link:
http://www.extendoffice.com/documents/word/751-word-select-equation.html
That's what I'd try anyway!

Lotus Notes toolbar button to move documents to favorite folders

I'm looking for assistance to create some Notes toolbar buttons to move selected documents to a favorite folders. I just want to hardcode a specified folder per button.
I'm not familiar with Notes Formula language or creating buttons so any tips would be helpful.
thanks.
#Command([Folder]; "folderName") will copy the selected document to "foldername"
Create Action on the view you wish to copy documents from and drop the above code in. You can play around with the Actions properties to control appearance, location etc.
Use a formula like this
#Command( [Folder] ; folderName ; moveOrCopy )
The following formula will move the selected document to the folder named "My Favorite":
#Command( [Folder] ; "My Favorite" ; "1")
If you omit folderName the Move To Folder dialog will be displayed.
The moveOrCopy parameter is optional. A value of "1" moves the document to the folder. A value of "0" copies the document to the folder. If you omit this parameter, Folder assumes a value of "0" (copy).
Also, if you have a subfolder, you can specify it with a double backslash like this:
#Command( [Folder] ; "My Favorite\\My Subfolder" ; "1")
I recently learned how to do this myself so I could create two different buttons with hardcoded folder locations. I used the following:
#Command([FolderDocuments];"Foldername";"1")
Of course, replace "Foldername" with the name you need and be sure to leave in the quotes.
Where it got a little tricky for me was trying to move an email to a subfolder of a folder. The normal backslash didn't seem to work. I don't know what made me think of it, but I tried two backslashes and that worked fine.
#Command([FolderDocuments];"Foldername\\subfolder";"1")
I know you're looking to hardcode the buttons, but if you're looking to create more than 2-3 buttons, I'd suggest looking to use a simple popup that lets you choose from a list of choices. That way you don't have to memorize which button is which and you won't run out of room on your toolbar.
The answer depends on a lot of factors that you've not specified here.
Is this for the Notes client? For a single database? Is the objective a personal favorites list for each user, or a shared favorites list? If yes for all of these, then why do you want to use a toolbar button for this? Just set up a 'Favorites' folder in the application, mark it as 'Shared, personal on first use', and teach users to move selected documents to it via drag and drop.
If it's for web browser users but still for a single database, drag and drop won't work so OTTA's answer is correct.
But if what you are trying to do is create a unified 'Favorites' feature that spans multiple databases, whether it's personal or otherwise... there's considerably more programming to do.
You may also want to take a look at SwiftFile, which learns from your behaviour and suggest folders to sort into. SwiftFile comes "for free" with your Notes Licence & Install SW.
http://www.research.ibm.com/swiftfile/

Resources