- Index
- » Users
- » rettifan
- » Profile
Posts
Posts
Hi,
is there a "predefined macro" in OpenModelica which can be used in a external function.
Frank
thanks
Hi,
I need to pass a Modelica (real) array to a external object. The function looks like this:
function addSurfaceObjectData "addSurfaceObjectData"
input Blender.Types.SurfaceObject component;
input Real[:,:] X;
...
external "C" addSurfaceObjectData(component, X);
end addSurfaceObjectData;
The corresponding c-function is something like:
void addSurfaceObjectData(void* object, double * x_array) {..
As far as I remember, this is currently not implemented in OpenModelica. Is that right?
Is there any workaround?
Frank
If I add a new component which has the "defaultComponentName" annotation the default name is not used.
ok
What does "top level" mean? I did some tests with a model that contains several blocks (each block has a external object inside).
In my test case the constructor and destructor seems to be called as expected.
Do I run into problems if the bock some were on a deeper model level?
I need a reliable solution because my block might be used somewhere in the model
Thanks for the work around, but I need to write a text file after the simulation to export some data.
Could I use the "destructor" of a external object as a work around?
Hello,
the following code:
model test111
Real a(start = 0.1);
algorithm
if terminal() then
a:=1.0;
Modelica.Utilities.Streams.print("terminal", "terminal.txt");
end if;
end test111;
gives me the error:
test111.cpp:734: error: `terminal' was not declared in this scope
Does OpenModelica currently support the terminal() function?
Frank
Hi,
I need to pass a string to a external c-function under windows. The string contains special characters like \n for a new line. If I Write the characetr to a text file, the two characters \n appear in the text file (and not the expected new line).
My questions:
How does OpenModelica treat special characters like \n?
Which string would give me the new line?
Frank
thanks, I'll cleanup my code.
As far as I remenber you told me, that the "LibraryDirectory" and "IncludeDirectory" annotations are currently not supported.
Is the implementation of these two annotations already on the todo list?
Frank
Hello List,
I'm working on a model that includes a „external object“. The task is to find a implementation that works for Dymola, SimulationX and Open Modelica. I currently have the following annotation syntax to include the c-code:
annotation (
dll="eobj.dll",
Include="#include <eobj.c>");
The annotation "dll="eobj.dll" is used by SimulationX and Dymola can process the "Include=#include <eobj.c>" statement. Unfortunately OpenModelica doesn’t accept this syntax.
My question:
Is there a annotation syntax for OpenModelica, that doesn’t affect the behaviour in Dymola and SimX (Maybe I can tweak the annotation a bit, so that it works for all three applications)
Best Regards,
Frank
Hello all,
I 'm using OMEdit 1.6 with MSL 3.1. Some models of the MSL 3.1 extend the new ModelicaServices Library, but I can't find the ModelicaServices in the library browser.
My question:
How does OpenModelica consider the "Modelica Services Library"?
Best regards,
Frank
Hello all,
I have some libraries developed with SimulationX and Dymola which I would like to use with OpenModelica.
My Question: Does OpenModelica currently support "External Objects"?
If yes, can anyone provide an example?
Best Regards,
Frank
- Index
- » Users
- » rettifan
- » Profile