Hello Jan,
Thanks for the reply. My only option is this version of Microstation that I mentioned. I agree with you on using bmake.exe for compiling and all of the examples I've seen, they are using this method for creating the .ma file. However, I found it very confusing using it as the most simple example (basic) uses multiple files and it's really hard to go through as a beginner. I have created something very simple and as I mentioned, I put it in a single file .mc and compile it with mcomp and mlink. Code is below:
#include <mdl.h> #include <tcb.h> #include <mselems.h> #include <userfnc.h> #define TEMP 1000 //variable to create the linestring MSElementUnion oElm; Dpoint3d lsPoints[MAX_VERTICES]; //int xp = 0; //int yp = 0; int nvertexCount = 0; //maximum 101 vertices – This is an array of coordinates Dpoint3d lsPoints[MAX_VERTICES]; void test(int sxp, int syp, int exp, int eyp){ //get start poin lsPoints[nvertexCount].x = sxp; lsPoints[nvertexCount].y = syp; //get end point lsPoints[nvertexCount].x = exp; lsPoints[nvertexCount].y = eyp; mdlLine_create(&oElm, NULL, lsPoints); mdlElement_add(&oElm); mdlElement_display(&oElm, NORMALDRAW); } int main(int argc, char *argv[]) { test(0,0,10000,0); test(0,0,0,10000); mdlState_startDefaultCommand(); mdlSystem_exit(NULL, 1);return 0; }
How can I put this into .cpp and .h and .mke and etc?