When a user edit a dimension to add text to the usual "*" this function returns everything as expected. eg ("* min.")
When the user add an additional line (carriage return) into the dimension text ("* min.\n2 of") the function returns no strings. The \n is the new line.
Is there any was to get the additional strings the user has added.
Hi,
please read and follow MicroStation Programming forum best practices!
How your question can be answered when it's not know what product (MicroStation expected, but can be different) do you use and what version? And if V8i or older, whether you use native code or old pseudocode?
With regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
Apologies, yes. I am using MicroStation V8i SS4 using native code.
Simple code to cycle through the dimension segments. Used debugger to inspect the values.
for ( int iLoop = 0; iLoop < mdlDim_getNumberOfSegments ( el ); iLoop++ ) { mdlDim_getStrings ( &dimStrings, &config, el, iLoop ); }
MicroStation V8i, Is Microstation v8i still the last version?
My last message was 9 years ago, then the last Microstation version was also v8i, very strange.
With Regards, Harry Stegeman
For the second time, after you delete my proflle.
I am Harry Stegeman, just search for me, I did answer hundreds of questions in the past. Before 9 years ago.
I am interrested to go back into Microstation architecture again.
No. MicroStation Connect series is the latest. The 64 bit versions. I am planning to focus on .NET c# development in the latest versions.
It has been too unreliable with the add on products so we are still mostly on V8i still.
from some other discussions I have found, it seems mdlDim_getTextDescr may help you.
Answer Verified By: StirlingH
You were right. I looked at that function before and was expecting it returned the descriptor as displayed on screen much like the usual stroking type functions. I hadn't passed the correct options to get anything back. It is not documented very well.
In fact if you have the right arguments it does return the raw strings form each line. It appears to work best if you use "ADTYPE_TEXT_SINGLE" and "ADSUB_NONE" in the arguments.
There is the #define ADIM_GETTYPE(dimVar) ((byte)((dimVar & 0x000000f0) >> 4)) macro in mdldim.h but it does not suggest where the argument comes from.
Thanks for sharing your findings and the results!
Regards,