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

RE: C++ Move Element

$
0
0

Great, here is the code I used to get the move working.  Right now it just moves some number of units.  I plan on adding functionality for deciding how far to move it.

....
		MSElementDescr* eledscr = 0;
		UInt32 filePos = 0;
		if (SUCCESS == mdlAssoc_getElementDescr(&eledscr, &filePos, eleId, attachment, FALSE))
		{
			//rc = (SUCCESS == mdlElmdscr_deleteByModelRef(eledscr, filePos, attachment, FALSE));
			Dpoint3d pntP;
			pntP.x = 100000;
			pntP.y = 100000;
			pntP.z = 0;
			Transform tMatrix;
			mdlTMatrix_getIdentity(&tMatrix);
			mdlTMatrix_setTranslation(&tMatrix, &pntP);
			mdlElmdscr_transformAllowModification(&eledscr, &tMatrix,attachment,attachment,0);
			mdlElmdscr_rewrite(eledscr, eledscr, filePos);
			mdlElmdscr_freeAll(&eledscr);
		}

Viewing all articles
Browse latest Browse all 7260

Trending Articles



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