Quantcast
Channel: MicroStation Programming Forum - Recent Threads
Viewing all articles
Browse latest Browse all 7260

RE: Opening a text file in Microstation 8.05.00.64

$
0
0

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?


Viewing all articles
Browse latest Browse all 7260

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>