TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: CAB on August 14, 2013, 09:49:21 AM
-
I sometimes get converted files from Micro Station and the fractions do not convert.
Last file had over a hundred of these and very time consuming converting them by hand.
The worst part is missing one or two buried in large mtext objects.
They show up in the Mtext & dimensions as ? or in the data as :
Mtext (1 . "{\\fFDOT|b0|i0|c0|p2;\\U+0182\" Ø Round Bar}") ---> (1 . "\\A1;{\\fFDOT|b0|i0|c0|p2;\\H0.7x;\\S3#4;\\H1.429x;\" Ø Round Bar}")
Dimension (1 . "{\\C256;2\\U+0185\"±}")
Any suggestion's as to how you would attack this problem?
Example DWG attached.
-
OK, found this on the net. Looks like a special font was being used to create these 018n codes.
Now I can do a search & replace with lisp.
eSize[0][0]=0xFEFF; /* 1/16 */
eSize[0][1]=0x0187;
eSize[1][0]=0xFEFF; /* 1/8 */
eSize[1][1]=0x0183;
eSize[2][0]=0xFEFF; /* 3/16 */
eSize[2][1]=0x0188;
eSize[3][0]=0xFEFF; /* 1/4 */
eSize[3][1]=0x0181;
eSize[4][0]=0xFEFF; /* 5/16 */
eSize[4][1]=0x0189;
eSize[5][0]=0xFEFF; /* 3/8 */
eSize[5][1]=0x0184;
eSize[6][0]=0xFEFF; /* 7/16 */
eSize[6][1]=0x018A;
eSize[7][0]=0xFEFF; /* 1/2 */
eSize[7][1]=0x0180;
eSize[8][0]=0xFEFF; /* 9/16 */
eSize[8][1]=0x018B;
-
OK I found the codes, I'll be able to finish this up. 8)
"\U+0187" ; 1/16
"\U+0183" ; 1/8
"\U+0188" ; 3/16
"\U+0181" ; 1/4
"\U+0189" ; 5/16
"\U+0184" ; 3/8
"\U+018A" ; 7/16
"\U+0180" ; 1/2
"\U+018B" ; 9/16
"\U+0185" ; 5/8
"\U+018C" ; 11/16
"\U+0182" ; 3/4
"\U+018D" ; 13/16
"\U+0186" ; 7/8
"\U+018E" ; 15/16
-
If you use a font which has those characters defined you might not need to convert them. E.g. Arial Unicode MS has them, including lots of others. See attached.
-
That would simplify things but I don't see 16th in there.
I'll take a look later today, work calls. :)
Thanks for the tip.
-
You're correct! Didn't realize. It seems the Oriya fractions aren't implemented in the Unicode Arial, only the Vulgar fractions.
http://unicode-search.net/unicode-namesearch.pl?term=fraction
I wonder what font MS is using, or if it's some internal font of their own.
-
I found the font from FDOT, there own creation. :?