Setting up Visual Studio 6 IDE for MDL- FAQ
Enabling compilation of mc files as native code from VS
How to set different Include or Library path in Visual Studio ?
You refer to a Help Index file "MDL_API.chi" Where does this file originate? Is this something you created using HTML Help workshop (it's not delivered with MicroStation)?
A: chi file was generated from recompilation of original chm file via HTML HELP workshop or other tool. nowadays chi file is not delivered by Bentley together with chm files
OK, where is the magic switch that generates a .chi file
A: in .hhp file under the [OPTIONS] section add "Create CHI file=Yes" and "Binary TOC=Yes" that is. You may use FAR http://www.helpware.net/FAR/index.html for HTML HELP generation...much more better than HTML HELP WORKSHOP
I tried the instructions, but I couldn't get the intellisense for MDL Built-in Functions to work either.
A: I would recommend you to use MDLtool add-in for Visual Studio which will copy all necessary project files including ncb file with intellisense and rename them as you need. Or you may manually copy template files presented in that zip and rename them manually...[hardcore way]
the MDLtool and templates are here:
http://www.sumbera.com/ustation/research/MDLtool.zip
All right, you want still experiments ?
The way how Visual Studio enables external intellisensing is more or less tricky and can be taken as Visual Studio bug...
the ncb file is not simply cleared and keeps all functions declarations. So change in your temp folder all FDF function declaration to definition,
rename *.fdf to *.c, insert them into project, remove them from project, save and reopen project...
);->){} this is not smile, it means change ); to ){}
I have added some .mc files into Visual Studio project and I want to compile them into native code, preserving mc extension. Implicitly it doesn't work :(
A: Well, this feature could be good in migration projects where both MDL interpreted code and native code need to be generated from one source MC. You need to update two registry values :
1. Set MC files as C file:
[HKEY_CLASSES_ROOT\.mc]
@="cfile"
2. Update Compiler settings:
[HKEY_CURRENT_USER\Software\Microsoft\DevStudio\6.0\Build System\Components\Platforms\Win32 (x86)\Tools\32-bit C/C++ Compiler for 80x86]
"Input_Spec"="*.c;*.cpp;*.cxx;*.mc"
3. Update your project settings
- go to Project/Settings
- switch to C/C++ tab page
- in Project Options (multiline item at bottom) add /TC so compiler would (yeah again;) know that we really need c compilation of mc files
Or look in deep here inside MSDN: Q181506
If I need two environments with different path of include or library files (which I may set under ToOls/options/directories ) how to set them for comfortable switch. Visual Studio use these directories when compiling into native code.
A1: That is mysterious why it is so bad documented... Anyhow run MSDEV.EXE /IYOURENVNAME. The /I switch will create in registry new branch with default settings for Visual Studio. So you may change whatever in options you want without affecting your original settings. You may create several environments each with different paths. Your new directory paths will be set under registry key shown bellow:
[HKEY_CURRENT_USER\Software\Microsoft\DevStudio\6.0YOURENVNAME\
Build System\Components\Platforms\Win32 (x86)\Directories]
while original settings are preserved in
[HKEY_CURRENT_USER\Software\Microsoft\DevStudio\6.0\
Build System\Components\Platforms\Win32 (x86)\Directories]
tip: export your registry key and rename 6.0 to 6.0yourname and import it into registry to 'clone' all options.
A2: from email sent by Neil Leather, Computair Limited. There is another way of setting include paths on a per target basis that has the advantage of being part of the project file so does not need setting up specifically on each machine. Below is a brief description from a colleague of mine on how to set this - not sure if this is of any use to you but thought it was the least I could do for the amount of help I will get from your site - if the embedded screen shot from V.Studio does not come out or you need more info then please mail.
Include paths per target:
Right click -> Settings -> C/C++ tab -> Preprocessor ( from Category combo )
-> Additional directories
Paths can have the full drive specification or can be relative to the targets .dsp file. Multiple paths are comma seperated. You need to be careful to set up the same include directories for debug and release builds otherwise you may get some interesting compiles.