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.
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 ); }
Hi,
from some other discussions I have found, it seems mdlDim_getTextDescr may help you.
With regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
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,