Automatically convert a MindMap to another app (e.g. MS Project) - c#

Here is the situation:
We ran a brainstorming session to find all the tasks we will have to achieve for our project
Now, I want to create a Gantt Planning (for instance) with all these tasks
We already built a MindMap with Xmind (I sometimes use Freemind too, or I could also export the Xmind to a Freemind format).
I would like to create a Gantt Planning in Microsoft Project (this is what we mainly use here).
My questions are:
Has anyone of you ever tried to automate the creation of a Gantt from the MindMap (using each level of the MindMap as Title and each leaf as Tasks)?
Would it be possible with VBA? Or C#? I didn't find much API to Xmind of Freemind, did I miss something?

If you can convert your mind map to Freemind, there is some documentation on the Freemind site which provides a couple of approaches to reformatting the Freemind file as an XML file which MS Project can read.
I maintain MPXJ, a library which can be used to read and write file formats which MS Project works with. I felt sure that someone had already written an add-on for Freemind which allowed you to export mind maps as a project plan using MPXJ... however I can't find a reference to it any more! If you don't mind a bit of coding (in Java, or any of the .Net languages) it wouldn't be too hard to achieve what you want using MPXJ.
Jon

We're doing exactly that with STOIC.

Related

What is the most straightforward way of modifying PDF start-up options via C#?

I'd like to know what would be the most straightforward (i.e., preferably without adding DLLs to my solution) way to write a C# code snippet for modifying a PDF document's page layout and magnification options.
I know this is incredibly easy in LaTeX (well, it's easy to set these for a PDF to-be-generated using a single package) through hyperref options.
Modifying an already-created PDF document is a lot more work however. Also, most MS Office print-to-PDF options don't seem to include this ability while it's obviously annoying to keep opening documents up in Acrobat and manually modifying these for the proper (desired) opening settings (layout: single page, and magnification: fit page, for me).
So, I would like to write a code snippet that could do this. What is the most straightforward way of modifying PDF start-up options via C#?
Alternatively, is there a way to force-apply these options when generating PDFs from MS Office software suites?
I looked into PDFSharp and MigraDoc at one point for PDF-making from C#, but that really didn't match what I was hoping for. Plus, it added a DLL set (of ten dependencies) which was sub-optimal with respect to how many ancillary files were included with the build for managing a relatively simple function.
However, as noted in the comments, such a batch modification code is likely to be very difficult without any dependencies, so I'll also accept answers which reference dependencies.
Past topics (but not very good matches):
This is similar but for JavaScript, and actually suggests it shouldn't be done.
This is a bit more elaborate for JavaScript, but not exactly what I am looking for.
This topic seems to be this question for PHP but including some external references...

How to create basic IFC File in C#

As per Wiki, The Industry Foundation Classes (IFC) data model is intended to describe architectural, building and construction industry data.
The Industry Foundation Classes (IFC) data model is a neutral and open specification that is not controlled by a single vendor or group of vendors. It is an object oriented file format with a data model developed by buildingSMART (International Alliance for Interoperability, IAI) to facilitate interoperability in the building industry, and is a commonly used format for Building Information Modeling (BIM).
For example One could be developing virtual building model in Revit, then send it to interior team who use ArchiCAD. It might also be sent to engineers who use Tekla. Before the IFC standard file type this would have been a nightmare. As Revit, ArchiCAD, Tekla can talk to each other, but not easily!!!
IFC aims to solve this problem, so that it won't matter so much. IFC file is unified format which can be understood by other CAD Softwares as well.
My Organisation works on one of the CAD Software and they want to export there Models in IFC so that it can be open and viewed in Other software's as well like Revit, ArchiCAD, Tekla.
So Our use case is, we need to create a IFC file of such a model.
So as per this Post, I am planning to use xBim. This link
I am using xBim Library to Create IFC File in C#. As per xBim documentation and Sample Code, I found that, How to create a Simple wall.
Now I want to create a basic Xbim.Ifc4.HvacDomain.IfcPump.
Can someone help me how to create one Xbim.Ifc4.HvacDomain.IfcPump in IFC using xBim C#?
I am new in CAD development and hence I am finding difficulties to understand the IFC. Please do the needful.
I hope this much information will be helpful,enough and clear.
Thanks in advance!!!
Without an example of code of what have you tried is difficult to help, but you can find resources in the API of XBim. With the examples of how to setup a wall in the document and the API documentation you should have clues to how to start your program, once you have some code, you can clarify the question so the community can help you more efficiently.
About how the IFC works and is written, you can find all you need to know here if you use a different version check the this website, in the IFC documentation the pump you are looking for is here.
I hope this resources are useful for you task.

ASP.NET and OpenXML - Create formatted/styled xlsx file - Best Solution?

This question might be more subjective, but I'm hoping someone with more experience can guide me in the right direction.
I'm brand new to web development, but have been coding C# for a couple years. My job wants me to convert an existing app we have to SharePoint 2013 and part of the app generates an excel report with custom formats and styling. In the original app we used Interop, but apparently since it's 32bit and our server is 64bit, Interop won't work. I thought about just doing a csv, but our customer is adamant about keeping the styling so I found OpenXML.
I don't have any experience with OpenXML, but I saw the tool can convert files into code. I loaded our template into the tool and it generated about 2000 lines of code which seems very excessive. Using Interop it's a fraction of the length and seems much easier to read. I'm tempted to just copy all the code over and stick it in a region (which I know most developers hate and I agree looks bad) and put a note at the top saying that if the template ever changes to just redo that region with the new one.
Is that my best option or is there a better alternative? Unfortunately our dev network is pretty closed off (it's a pain to get approval on third party non Microsoft stuff) so I'm limited on third party libraries I can add as well. If there's an option without doing that, that'd be preferred.
If you have one or more templates, just use OpenXML to create a new workbook from a template for each request. And then use code to enter values into named ranges, datasets into rows, etc.
BTW—ClosedXML makes simple and medium things a lot easier.

Editing Microsoft Word Documents Programmatically

I want to know if this could be done.
I am building a data dictionary for our software system (school project), and I'm thinking of an automated way to do this. Basically I don't use much of Microsoft Word (2007), I only use it in documenting schools stuff, etc. I want to know if its possible to create/edit a Word document programmatically from a template.
The idea is, I will create a page on Word that contains an empty form that will be repeated on every page. For every data that I will input to my program, it will update the corresponding field in the form and skips to the next form.
The purpose of this, is to eliminate copy-paste methods (my habit) and to speed things up when doing the documentation.
Word automation, as suggested by others, will lead you to a world of hurt for two major reasons:
Office is not intended to be run unattended, so it can pop up message boxes at any time, and
It is (probably) not licensed to enable office functionality for computers which don't have it. If you generate a Word document on a web site using automation, you have to make sure that this functionality cannot be reached by computers which don't have office installed (unless they changed this rule in the last years).
I have used Aspose.Words, it costs a little, but it works well and is intended for this.
Not exactly sure what you really want, but creating word documents with c# shouldn't be any problem:
http://support.microsoft.com/kb/316384
If i find out your purpose correctly you need to visit this microsoft msdn link
Manipulating Word 2007 Files with OpenXML
Definitely possible. A fairly easy way of doing it using Office Automation. See this KB article for a basic sample: How to automate Microsoft Word to create a new document by using Visual C#
I think the main difference to that sample will be that you'll open your template and do SaveAs instead of creating a new document, but I can't remember exactly.
However, depending on your exact requirements, there might be better alternatives. For example, it's not recommended to do Office Automation on servers (including on webservers), so if that's needed you might want to look at something else.
You can use com interop of .net framework.
Understanding the Word Object Model from a .NET Developer's Perspective
Building COM Objects in C#
Using COM programming is not the best way as mentioned by erikkallen, I suggest using OPEN XML. It is really easy to use and your document generation operation will be very fast.
http://blog.goyello.com/2009/08/21/how-to-generate-open-xml-file-in-c-in-4-minutes/
http://msdn.microsoft.com/en-us/library/aa338205(v=office.12).aspx

Importing mpp file into SQL Server through ASP.NET?

I have an assignment which is to import mpp file into database via ASP.NET (C#).
Can anyone please advice me on this matter.
Any help is very much appreciated.
Thanks.
Depending on the situation, using Interop isn't necessarily a good choice (have to have Project installed on the machine).
You can use MPXJ to open the mpp file and read the information in it. It's free and open-source and works fairly well, though since it's a port from Java, you have to do some things in a Java way in your .NET code.
A paid option is ASPOSE.Tasks, which is a little nicer to use, but pretty expensive.
Project programmability is available in C# but docs are only available for VBA.
This should get you going - all the stuff that is available in VBA can be accessed from C# using the Project Primary Interop Assembly from the list here.
Check out Application.FileSaveAs.

Categories