How can I use dymola to produce FMU with 64bit dll - dymola

I need to use dymola to produce fmu-file with 64-bit-dll.
The condition is:
I use bin64-version-dymola, but fmu-file is 32-bit-dll
I searched internet, and I found I should set flag Advanced.CompileWith64=2.
But problem is, I can not find the location for setting Advanced.CompileWith64=2.
Anyone know where I can set the value of Advanced.CompileWith64?

You have to input that in the command line on the Simulation tab (ctrl+F2) as you can see in the screenshot below.
I hope this helps,
Marco

Install the latest Dymola version, e.g. 2014 FD01. Install Visual Studio 2012 that contains VC++ 2012 Express Edition. You will need only the compiler so there is no need for a license. This compiler is capable of generating 64 bit code. In the Simulation Setup/Compiler tab, select Visual Studio 2012/Visual C++ Express Edition (11.0). In the FMI tab select 64-bit binaries.

Related

Simulation in Catia of different versions

My simulation is run in the dum kinetics module, the code was written in vb automation in Visual studio 2010 environment. My problem is when I ran the simulation in Catia R18, the process was completely smooth and successful, but when I tried to run it in a different version, like R20 or R21, an error occurs.
Through the breakpoint, I found out that the error was caused by the failure of acquiring the "Mechanisms" in the product of Catia. Here is the code :
theMechanism = product1.GetTechnologialObject("Mechanisms")
When the breakpoint executes this sentence, variable theMechanism shows "Nothing".
The only way I know to solve this problem is run the code again in visual studio 2012 environment, then the simulation works in Catia R20 or R21, but after that you can't run the simulation in Catia R18, if you want to revert back to the version R18, you have to run the code in visual studio 2010.
Can anyone explain what is the cause of the conflict between versions of Catia and give me a solution for this? Thanks!
I think You have defined theMechanism as Mechanism Instead try it as variant.
product1.GetTechnologialObject("Mechanisms")
Returns Mechanisms, not Mechanism.
So:
theMechanisms = product1.GetTechnologialObject("Mechanisms")
theMechanism = theMechanisms.Item(1)
Also, if you have multiple CATIA versions installed on one PC, check which one is the main one (check RegServer command). Check if Visual Studio versions have references to the same CATIA version or not. In theory, they should, if you didn't change the main CATIA version.
You could also get the mechanism through the following:
KinematicsWorkbench kinWork = (KinematicsWorkbench)productDocument1.GetWorkbench("KinematicsWorkbench");
Mechanisms mechanisms = kinWork.Mechanisms;
Mechanism mechanism = mechanisms.Item(1);
This is C# code, but the VB.NET code should be nearly identical outside of some slight syntactical differences.
EDIT:
If multiple CATIA versions are installed on one machine, the last one which is installed will be a default one. To change a default CATIA version, follow these points (taken from here):
Open cmd.exe
Change Directory in the CMD window by typing “CD /code/bin” (Typically CD C:\Program Files\Dassault
Systemes\Bxx\win_b64\code\bin) and then press Enter.
In the next line type in “CNEXT.exe /regserver” and press Enter.
This will appear to have done nothing but will display the next line. At this stage restart the machine and then enjoy.

using excel vba to open specific version of brio (hyperion reporting studio)

I was using Hyperion version 9.3.3 to process my queries and was recently upgraded to version 11. The problem I'm encountering is that version 11 doesn't have the same amount to computational space as 9.3.3, so until I create a solution to this I'd like to continue to use 9.3.3 (which is still on my machine along with version 11). Does anyone know how I would do this in macros created in Excel vba? My current code is quite simple:
Set mybrio = CreateObject("BrioQuery.Application")
mybrio.Documents.Open (excel_loc & "\" & brio_filename)
This code opens version 11 though by default and I want version 9.3.3. Can anyone help me alter this code to have specifically target 9.3.3?
In VBA IDE window- Tool-->Reference --There will be the list of Visual Basic Applications. Check if there are two versions available in it? if so Uncheck the latest version and check the old version

glew32.dll error in Visual Studio 2012

This problem is pretty self explanatory. Here are the details: I'm trying to include freeglut and glew in Visual Studio 2012 on Windows 8. I'm on a 64 bit system, so I thought I needed to put glew32.dll in my 64 bit system folder. I tried that and receive the following error:
"The application was unable to start correctly (0xc000007b). Click OK to close the application."
Which I've interpreted as I'm trying to put a 32 bit dll in the 64 bit folder or vice-versa.
Just for laughs, I tried putting the file in System32, but of course, it just told me the file wasn't on my computer. Any suggestions?
EDIT* May I also add that some of the set up for this was NOT the same as it would have been on Windows 7 or Visual Studio 2010 or earlier. I may have missed something because I kind of winged it using the search function combined with some documentation I found on various websites. (i.e the lib and include folders are no longer in the same place)
EDIT2* I'm sure this can probably be derived, but I want to add it anyway for clarity: If I removed the dependency for glew32.lib and comment out any code using glew.h, the window forms as it should. I don't think my source code is needed seeing as I'm 99% sure this is not a code issue, but if anyone wants to see it, let me know and I'll attach it.

Can't use FAXCOMEXLib in VS 2010 anymore?

I'm just in the process of moving from Visual Studio 2008 to Visual Studio 2010.
One of my projects use the Microsoft Fax Service Extended COM Type Library. After converting the project to VS 2010 I get the following compiler error:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.Targets(1558,9): error MSB3648: The Keycontainer-path "VS_KEY_812A0248FF872DEC" ist invalid. KeyContainer must point to an existing file.
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.Targets(1558,9): warning MSB3283: Wrapperassembly for type library "FAXCOMEXLib" not found.
I tried to remove FAXCOMEXLib from the project and adding it again, but it did not help.
I got a similar problem with other COM references.
How do I resolve this?
It is a known bug. Take a look at this Microsoft Connect entry which has a workaround.
this might not be relevant for you any more, but might be so for others. I've had the same problem recently and in my searches I found this list of common FAXCOMEXLib errors. I helped me, in any case.

VB.Net 2008 IDE hanging - MSVB7.dll eating 100% CPU when editing code

Edit 1: Uninstalled & Reinstalled
Edit 2: Same problem. Seriously? Yes.
I am having a problem with msvb7.dll eating 50%+ cpu on my dual core system. This usually lasts 10-30 seconds or so, during which time the IDE is non-responsive.
This occurs when I do pretty much anything in the text editor, and can be replicated by simply adding blank lines to a function, and then deleting them. Or pasting some code. Or... lotsa stuff.
SP1 installed
I had DevExpress' refactor/coderush, components, and codeit.right installed, but have removed all 3 of them.
(I had installed the latest version of Refactor Pro! (9.3.4), perhaps the day before)
I have tried a VS.NET Repair.
There is a kb that referenced some cpu destroying with vb, but it was included in SP1
Also:
The solution consists of ~30 VB projects and 2 C# projects
8 other developers aren't having any issues with this (or at least not the SAME issues, we all have em)
Clean get from TFS was done
Project builds properly, can can even debug.
This doesn't seem to happen on really small solutions, but perhaps it does and it just goes away super quick.
Any clues at all as to what might be causing this, or how to fix it? I REALLY don't want to lose another day uninstalling and reinstalling and patching and so on =) If that even fixes it.
Edit looking at these two hotfixes. Applied 957912, the first one
KB957912: Updates for Visual Studio 2008 SP1 debugging and breakpoints
KB967631: When you debug in Visual Studio 2008 Service Pack 1, more breakpoints are generated unexpectedly, or the IDE crashes or becomes unresponsive for about 15 seconds
Here is the stack trace (process explorer) that I get from the threads window when the msvb7.dll is churning.
--- title in process explorer [threads] tab for process --------
cpu:49.28% cswitch delta: 300 to 3500 startaddress: [msvb7.dll+0x4218c]
msvb7.dll version: 9.0.30729.1
--- actual stack trace -------
ntkrnlpa.exe!KiUnexpectedInterrupt+0x121
ntkrnlpa.exe!ZwYieldExecution+0x1c56
ntkrnlpa.exe!KiDispatchInterrupt+0x72e
NDIS.sys!NdisFreeToBlockPool+0x15e1
// shortened stack trace. all of these are from msvb7,
msvb7.dll+0x46ce7 <- 0x2676a <- 0x2698e <- 0x38031 <- 0x2659f <- 0x26644
msvb7.dll+0x25f29 <- 0x2ac7a <- 0x27522 <- 0x274a0 <- 0x2b5ce <- 0x2b6e4
msvb7.dll+0x67d0a <- 0x68551 <- 0x6817b <- 0x681f0 <- 0x67c38 <- 0x65fa8
msvb7.dll+0x666c6 <- 0x6672c <- 0x6673d <- 0x6677c <- 0x667b4 <- 0x63c77
msvb7.dll+0x63e97 <- 0x42c3a <- 0x42bc1 <- 0x41bd7
kernel32.dll!GetModuleFileNameA+0x1b4
This is the list of stuff from "copy info" in help->about, shortened to a resonable length.
Microsoft Visual Studio 2008 | Version 9.0.30729.1 SP
Microsoft Visual Studio 2008 Professional Edition - ENU Service Pack 1 (KB945140) KB945140
Microsoft .NET Framework | Version 3.5 SP1
Microsoft Visual Basic 2008
Microsoft Visual C# 2008
Microsoft Visual F# for Visual Studio 2008
Microsoft Visual Studio 2008 Team Explorer | Version 9.0.30729.1
Microsoft Visual Studio 2008 Tools for Office
Microsoft Visual Web Developer 2008
Hotfix for Microsoft Visual Studio 2008 Professional Edition - ENU
KB944899, KB945282, KB946040, KB946308, KB946344, KB946581, KB947171
KB947173, KB947180, KB947540, KB947789, KB948127, KB946260, KB946458, KB948816
Microsoft Recipe Framework Package 8.0
Process Editor WIT Designer 1.4.0.0
Process Editor for Microsoft Visual Studio Team Foundation Server, Version 1.4.0.0
tangible T4 Editor 9.0
tangible T4 Text Template Editor - T4 Editor
tangibleprojectsystem 1.0
Team Foundation Server Power Tools October 2008
SQL Prompt 4.0 (disabled)
Use Process Monitor (http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx) and trace the activity of Visual Studio when it exhibits this behavior. I have done this many times before with great success.
I am actually monitoring Excel on startup to determine why Excel is having problems with a VSTO Add-in. It turns out Excel is trying to also load a previous version, so I have two add-ins loaded. I figured this out in less that a minute. Without Process Explorer I might have been troubleshooting for hours or days.
I've seen something similar happen when you have a circular reference in a specific way in a class. It's trying to show intellisense and ends up in an infinite loop trying to build the list. I don't remember the exact circumstances now, though.
Given up and wiped VS 2008 & all supporting software. Reinstalling now. It is fun to debug, but I had to cancel a meeting this morning because I couldn't get anything going.
If I get a job at MS then I'll look into it further... but this one is just too hard for
me and my limp debugging skills leftover from years doing .net ;)
DOH! Reinstalled and it is still broke! I may actually have to solve this :(
#amissico: thanks, i had forgotten about that completely.
The problem is somewhere in the parsing thread, and I can't work out how to pinpoint what it is doing wrong. I see lots of FS activity, but nothing that I can identify as wierd. It just keeps building temp files (all the same name?) It just looks like it is doing everything everytime, the slow way. I don't know what it should look like, though.
Startup is fine, this is mostly happening when I edit files. It just starts chewing for intellisense, it appears, but why it takes so long is wierd.