api - Custom Properties Text Font -


i have created macro imports custom properties solidworks part file. problem solidworks seems not understand chosen vba text font , imports modified text. me resolve problem? you can see altered text here.

solidworks output

enter image description here

i don't think can test since install uses english ascii encoding , appears using characters cannot use, found code convert ascii unicode:

public function asciitounicode(stext string) string   dim satext() string, schar string   dim sfinal string, safinal() string   dim x long, lpos long    if len(stext) = 0     exit function   end if    satext = split(stext, ";") 'unicode chars semicolon separated    if ubound(satext) = 0 , instr(1, stext, "&#") = 0     asciitounicode = stext     exit function   end if    redim safinal(ubound(satext))    x = 0 ubound(satext)     lpos = instr(1, satext(x), "&#", vbtextcompare)      if lpos > 0       schar = mid$(satext(x), lpos + 2, len(satext(x)) - (lpos + 1))        if isnumeric(schar)         if clng(schar) > 255           schar = chrw$(schar)         else           schar = chr$(schar)         end if       end if        safinal(x) = left$(satext(x), lpos - 1) & schar     elseif x < ubound(satext)       safinal(x) = satext(x) & ";" 'this semicolon wasn't unicode character     else       safinal(x) = satext(x)     end if   next    sfinal = join(safinal, "")   asciitounicode = sfinal    erase satext   erase safinal end function 

Comments

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -