Hi MicroStation Programmers,
I have a question about developing makefiles for MDL. I am developing under MicroStation V8i SELECTSeries 4.
In the sample MDL project "basic" from the SDK, I found that it is using the marco "genSrc". The corresponding command in the basic.mke file is
To understand what this makefile is actually doing, I tried to find out where genSrc is defined. After spending a significant amount of time, I found that the definition of this marco hides deep in the out-of-box MicroStation files. Below is the "include" relationship:
basic.mke-->mdl.mki-->ConfigurePolicy.mki-->MicroStationPolicy.mki (defines genSrc)
Now it seems to be a problem for me: if I am authoring another MDL like the "basic" sample, how can I know that there is such a genSrc marco I can use. It is almost impossible for me to browse 3 levels down the system .mki files to find the marco that I can use.
Is there any way I can find the list of marcos that I can use, such that I can develop MDL like the "basic" sample?
Sui Huang said:After spending a significant amount of time, I found that the definition of this marco hides deep in the out-of-box MicroStation files
I do not think it requires any substantial amount of time. When I need to find a macro definition, I simply use fulltext search (using e.g. Visual Studio Code) in \mdl\include\ with *.mki filter. Typically, only a few results exists and one only is the definition.
Sui Huang said:It is almost impossible for me to browse 3 levels down the system .mki files to find the marco that I can use.
Whereas it sounds rational to know all macros you can use, it's not good idea in my opinion.
There are about 40 mki files, defining tens (maybe over a hundred?) macros, covering a huge amount of aspects of building process. Some from them are obsolete (e.g. pseudocode MDL development), some are rarely used (e.g. signing) and others are for internal or not native app development tasks. So even when you will be able to read and analyze all definitions, only a small part will be valid for your work.
Sui Huang said:Is there any way I can find the list of marcos that I can use, such that I can develop MDL like the "basic" sample?
I recommend to copy a structure of some example delivered with SDK and when there will be anything not clear, use fulltext search to find its definition and/or ask here.
Some files contains explanation (see e.g. dlmlink.mki), some not. But even with description available, it's not always simple to understand why and when the macro should be used. So to copy existing working example is much easier way.
Labyrinth Technology | dev.notes() | cad.point
Answer Verified By: Sui Huang
Hi Jan, thank you for the explanation on the way of using the SDK sample and include files.