docmosis - relative link to file - docmosis

I try to create a report (PDF/WORD) using docmosis.
In my report, I would like one of the fields to point to a file that resides relatively to the output-report. Is it possible? I saw the documentation that says I have to add to the template the prefix link:, e.g. <<link:linkToFile>> so docmosis understands this is a link. However, in the output report this links to a directory which does not even exist under %TMP% folder (C:\Users\ohadr\AppData\Local\Temp...).
Is there a way to add a link to file with docmosis? And how about relative file?

The <<link:abc>> directive is intended for external links which can be to files to download etc. Currently it will not reference any relative content/file.

Related

Access to a project subfolder

I would like to insert images in my m2doc template from an image folder in a library.
I access the library with the following query :
self.siblings().eContents(libraries::LibraryReference).library.eInverse(capellamodeller::Library)
But I can't find any folder with myLibrary.eContents() and myLibrary.ownedFolders returns null.
I also tried with myLibrary.getProject() and myLibrary.getRootContainer() but the result is the same.
Is it possible to access a subfolder in a project?
Thank you for your help,
Eva
I'm not sure how images are stored, but if the file is on the file system you can access it via its path either relative to your .genconf file or absolute.
Maybe someone on the Capella forum could give you more details about image storage in Capella libraries.

Xcode folders and groups confusion

I'm using Xcode (with C++) and my project layout (in the file system, not in Xcode) looks like this:
SubfolderA
-file_A_1, file_A_2
SubfolderB
-file_B_1, file_B_2
Right now I've set up this structure in Xcode via groups. And so, when I want to include file_A_2 in file_B_1, I write #include "file_A_2" in file_B_1.
Is there some way to make an inclusion look like #include "/SubfolderA/file_A_2", so that I can easily see to what directory/subfolder an included file belongs?
One way to see what's going on is to look at the Build Log and expand the line for compiling sourcefile.m. Look at the -I options being passed to the compiler.
If it's not to your liking you can add the source tree in the Build Settings > Header Search Paths to include $(ProjectDir)/srcroot and make it recursive, which saves you from adding each sub-folder individually.
In my experience this has never been necessary, however, as far as I can remember.
As far as the Xcode folders are concerned, if the top-level source folder is added then all sub-folders are automatically added when you add them to the filesystem, saving the hassle of keeping them in sync. You might need to add the top-level folder under the Source Files group for this to work, however.
Surprisingly, in Xcode's Build Settings I've added to User Header Search Paths non-recursive path to my project. This solved my problem.
I ended up here when I was having an issue with XCode while trying to include a header in a group by doing
#include "MyGroup/MyHeader.h"
Turns out the project structure and the file system weren't in sync, so I just had to remove my group from the project, put it in the correct place in Finder, then drag and drop it back into the project in the correct place and it worked for me.
I'm not sure if this is necessary or not, but I also have already set up my app's working directory because I am doing some game programming and need to be able to load in .png and make textures.

Why doesn't Xcode6 see included header files

I'm trying to build opencv2 as a universal framework. I am systematically removing the files/folders that I do not need. But I am running into this issue where the include files are not found. See the image below:
The following image clearly shows that the file is indeed there.
One of the contractors working with us said he had put the include files into the same directory as the source files and rename them according to their file structure but using "." instead of "/" as shown below:
But that means that I must go through all of the files that include files and change the include statement to use "." instead of "/". REALLY?
Is this true? Or do we have a configuration set wrong?
You need to setup search paths for your target in Build Settings->Search Paths->Header search paths.

Header file inside the same solution

http://youtu.be/6NCtnKcwOas (select better quality!)
As you can see on the attached video, I have the two projects in my solution - a dll creator and a simple testing project. Just followed this tutorial .
Why does the MathFuncsDll.h still remain undetected?Everything works fine after specifying the full path after '#include'. However, I don't want to use such rough-and-ready method because it looks messy and unprofessionally.
If you can specify the file using an absolute path, but not by only using its filename, the compiler doesn't "know" about the folder containing that file.
You can tell the compiler about your additional include directories via the /I directive (documentation). And of course you can set that via the IDE.

Can I create a cross-project source reference in redmine?

If you have two separate projects that is somehow connected. How can one make a reference to the source of the other project?
For referencing the source of your own project you use:
source:some/file
But since I want to refer to code in another project my thought was that I could write something like:
other_project:source:some/file
Anyone that knows if this is possible in some way? I have read http://www.redmine.org/wiki/redmine/RedmineTextFormatting#Redmine-links but found no clues there.
Apparently this was implemented in Redmine 1.2.0 (released 2011-05-30). The syntax is exactly the one you suggested in the question, other_project:source:some/file, other_project being the project identifier.
It is possible in a couple of ways - although neither solution is particularly neat.
use an external html link to the other_project source code, where other-proj is the identifier for the other project.
"other project source":http://myserver:3000/projects/other-proj/repository/entry/file.txt
define the source path via the parent directories, so from the source directory of your current project go up 3 directory levels before navigating back down to the repository of your other project. Note the source link needs to be inside double quotes to work. This method at least keeps the source tag at the front of the link.
source:"../../../other-proj/repository/entry/file.txt"
The Redmine Text Formatting page says the format is:
source:repo_identifier|some/file
Even so, the selected answer works for my version of Redmine (1.4.2), but it may have been changed in later versions. This link format was added to that wiki page on 2012-08-27, after OP asked their question.