本帖最后由 1291500406 于 2020-3-10 09:53 编辑
{\\fSimSun|b0|i0|c134|p2;顶板}610×75{\\H0.5x;\\T0.95;\\C201;\\S+0.1^ 0;}×18{\\H0.5x;\\T0.95;\\C201;\\S+0.04^ 0;}
{\\fSimSun|b0|i0|c134|p2;顶板}610×75×18
;;测试
(vla-put-TextString (vlax-ename->vla-object (car (entsel))) "{\\fSimSun|b0|i0|c134|p2;顶板}610×75×18")
{\\fSimSun|b0|i0|c134|p2;顶板}610×75×18
移除定位字符串{\\H0.5x;\\T0.95;\\C201;\\S+0.04^ 0;}部分数据
_$ (vl-string-position (ascii"z") "azbdc")1_$ (vl-string-position 122"azbzc")1_$ (vl-string-position (ascii"x") "azbzc")nil The search string used in the following example contains two “z” characters. Reading from left to right, with the first character being displacement 0, there is one z at displacement 1 and another z at displacement 3: _$ (vl-string-position (ascii"z") "azbzlmnqc")1
Searching from left to right (the default), the “z” in position 1 is the first one vl-string-position encounters. But when searching from right to left, as in the following example, the “z” in position 3 is the first one encountered: _$ (vl-string-position (ascii"z") "azbzlmnqc" nil t)3
|