资源描述:
函数使用说明 1.坐标转换函数convertm,x1,y1,x2,y2,x3,y3,a,t m是图纸比例;1m; x1y1是待转换的cad屏幕坐标值(整体坐标);在cad里用list命令将pl线节点坐标导入excel; x2y2是基点的cad屏幕坐标值(整体坐标);在cad里用id命令查看的结果; x3y3是基点标注的坐标值(局部坐标);以m为单位; a是坐标旋转角度;以度为单位; t是参数取1则转换x坐标,取2则转换y坐标。 2.放线函数settingm,x1,y1,x2,y2,x3,y3,a,t m是图纸比例; x1y1是待放线的坐标值(局部坐标);以m为单位; x2y2是基点标注的坐标值(局部坐标);以m为单位; x3y3是基点cad屏幕坐标值(整体坐标); a是坐标旋转角度;以度为单位; t是参数取1则转换x坐标,取2则转换y坐标。 3.函数经过32种组合方式检验(见下图和附表),应该没有问题。 4.函数代码保护密码qxc 参考文献学习微软 Excel 2002 VBA 编程和XML,ASP技术作者Julitta Korol 翻译Tiger Chen 背景知识cad屏幕直接读出的坐标暂且称整体坐标,测量图坐标称局部坐标。 放线时,将放线表格里标有“copy到cad”说明的那一列复制,来到cad里,键入命令pl后回车 点鼠标右键粘贴,pl线已经画好了。 X Y X Y X Y X Y x1y1是待转换的cad屏幕坐标值(整体坐标);在cad里用list命令将pl线节点坐标导入excel; x2y2是基点的cad屏幕坐标值(整体坐标);在cad里用id命令查看的结果; 参考文献学习微软 Excel 2002 VBA 编程和XML,ASP技术作者Julitta Korol 翻译Tiger Chen 放线时,将放线表格里标有“copy到cad”说明的那一列复制,来到cad里,键入命令pl后回车 比例所求点cad屏幕坐标基点cad屏幕坐标基点标注坐标旋转角度 1 x1y1x2y2x3y3θ mmmmmm 20005963.2725 20039.6536088.272520164.6532353750 3746125090 6151.8795 20107.0933 6213.2725 20164.653 6553.2985 19539.653 7724.8532 19533.9233 结果检验 自定义函数A点 XYxy mmmm 2354000.000037461000.00002354000.000037461000.000 2353622.786037461134.88062353622.786037461134.881 2353500.000037461250.00002353500.000037461250.000 2352819.948037460000.00002352819.948037460000.000 2350476.838637459988.54062350476.838537459988.541 比例预放线的坐标基点标注坐标基点cad屏幕坐标旋转角度 结果 1自定义函数 x1y1x2y2x3y3θX mmmmx 20002354000 374610002353750 37461250 6088.273 20164.65905963.2725 2353623 3746113500006151.8795 2353500 3746125000006213.2725 2352820 3746000000006553.2985 2350477 3745998900007724.8532 拷贝到cad放pl线 Y检验 yx,y 20039.653 5963.2725,20039.6535963.272520039.6530 20107.0933 6151.8796,20107.09336151.879520107.0933 20164.653 6213.2725,20164.6536213.272520164.6530 19539.653 6553.2986,19539.6536553.298519539.6530 19533.9233 7724.8533,19533.92347724.853219533.9233 convert函数检验4个象限16种情况,坐标系旋转角度特殊 坐标系旋转待求点位置比例x1y1x2y2 0~45局部坐标1象限100059896.373932985.687359846.373932935.6873 局部坐标2象限100059796.373932985.687359846.373932935.6873 局部坐标3象限100059796.373932885.687359846.373932935.6873 局部坐标4象限100059896.373932885.687359846.373932935.6873 45~90局部坐标1象限100060250.971433006.398060250.971432935.6873 局部坐标2象限100060180.260732935.687360250.971432935.6873 局部坐标3象限100060250.971432864.976760250.971432935.6873 局部坐标4象限100060321.682132935.687360250.971432935.6873 90~180局部坐标1象限100059776.737532722.829359846.373932735.1080 局部坐标2象限100059858.652732665.471659846.373932735.1080 局部坐标3象限100059916.010332747.386859846.373932735.1080 局部坐标4象限100059834.095132804.744559846.373932735.1080 270~360局部坐标1象限100060321.682132748.304060250.971432748.3040 局部坐标2象限100060250.971432819.014760250.971432748.3040 局部坐标3象限100060180.260732748.304060250.971432748.3040 局部坐标4象限100060250.971432677.593460250.971432748.3040 函数检验4个象限16种情况,坐标系旋转角度非特殊 0~90局部坐标1象限100059881.729232996.924659846.373932935.6873 局部坐标2象限100059785.136732971.042759846.373932935.6873 局部坐标3象限100059811.018632874.450159846.373932935.6873 局部坐标4象限100059907.611132900.33259846.373932935.6873 90~180局部坐标1象限100060171.432932968.633360232.670132933.2779 局部坐标2象限100060197.314832872.040760232.670132933.2779 局部坐标3象限100060293.907432897.922660232.670132933.2779 局部坐标4象限100060268.025532994.515260232.670132933.2779 180~270局部坐标1象限100059891.452832608.11459903.731532677.7504 局部坐标2象限100059973.36832665.471659903.731532677.7504 局部坐标3象限100059916.010332747.386859903.731532677.7504 局部坐标4象限100059834.095132690.029259903.731532677.7504 270~360局部坐标1象限100060316.863232748.64460248.56232730.3427 局部坐标2象限100060230.260732798.64460248.56232730.3427 局部坐标3象限100060180.260732712.041460248.56232730.3427 局部坐标4象限100060266.863232662.041460248.56232730.3427 setting函数检验比例预放线的坐标0 基点标注坐标0 10000 0 x1y1x2y2 0~4510002330800.0037452050.00233075037452000 010002330800.0037451950.00233075037452000 010002330700.0037451950.00233075037452000 010002330700.0037452050.00233075037452000 45~9010002330800.0037452050.00233075037452000 010002330800.0037451950.00233075037452000 010002330700.0037451950.00233075037452000 010002330700.0037452050.00233075037452000 90~18010002330800.0037452050.00233075037452000 010002330800.0037451950.00233075037452000 010002330700.0037451950.00233075037452000 010002330700.0037452050.00233075037452000 270~36010002330800.0037452050.00233075037452000 010002330800.0037451950.00233075037452000 010002330700.0037451950.00233075037452000 010002330700.0037452050.00233075037452000 函数检验4个象限16种情况,坐标系旋转角度非特殊00.000.0000 0~9010002330800.0037452050.00233075037452000 010002330800.0037451950.00233075037452000 010002330700.0037451950.00233075037452000 010002330700.0037452050.00233075037452000 90~18010002330800.0037452050.00233075037452000 010002330800.0037451950.00233075037452000 010002330700.0037451950.00233075037452000 010002330700.0037452050.00233075037452000 180~27010002330800.0037452050.00233075037452000 010002330800.0037451950.00233075037452000 010002330700.0037451950.00233075037452000 010002330700.0037452050.00233075037452000 270~36010002330800.0037452050.00233075037452000 010002330800.0037451950.00233075037452000 010002330700.0037451950.00233075037452000 010002330700.0037452050.00233075037452000 x3y3axy 23307503745200002330800.0037452050.002330800.000 23307503745200002330800.0037451950.002330800.000 23307503745200002330700.0037451950.002330700.000 23307503745200002330700.0037452050.002330700.000 233075037452000452330800.0037452050.002330800.000 233075037452000452330800.0037451950.002330800.000 233075037452000452330700.0037451950.002330700.000 233075037452000452330700.0037452050.002330700.000 2330750374520001452330800.0037452050.002330800.000 2330750374520001452330800.0037451950.002330800.000 2330750374520001452330700.0037451950.002330700.000 2330750374520001452330700.0037452050.002330700.000 2330750374520003152330800.0037452050.002330800.000 2330750374520003152330800.0037451950.002330800.000 2330750374520003152330700.0037451950.002330700.000 2330750374520003152330700.0037452050.002330700.000 0.000.00 233075037452000152330800.0037452050.002330800.000 233075037452000152330800.0037451950.002330800.000 233075037452000152330700.0037451950.002330700.000 233075037452000152330700.0037452050.002330700.000 2330750374520001052330800.0037452050.002330800.000 2330750374520001052330800.0037451950.002330800.000 2330750374520001052330700.0037451950.002330700.000 2330750374520001052330700.0037452050.002330700.000 2330750374520002152330800.0037452050.002330800.000 2330750374520002152330800.0037451950.002330800.000 2330750374520002152330700.0037451950.002330700.000 2330750374520002152330700.0037452050.002330700.000 2330750374520003302330800.0037452050.002330800.000 2330750374520003302330800.0037451950.002330800.000 2330750374520003302330700.0037451950.002330700.000 2330750374520003302330700.0037452050.002330700.000 基点cad屏幕坐标0 旋转角度 结果0 检验 000 自定义函数0 x3y3θXYx 59846.373932935.6873059896.373932985.687359896.3739 59846.373932935.6873059796.373932985.687359796.3739 59846.373932935.6873059796.373932885.687359796.3739 59846.373932935.6873059896.373932885.687359896.3739 60250.971432935.68734560250.971433006.39860250.9714 60250.971432935.68734560180.260732935.687360180.2607 60250.971432935.68734560250.971432864.976760250.9714 60250.971432935.68734560321.682132935.687360321.6821 59846.373932735.108014559776.737532722.829359776.7375 59846.373932735.108014559858.652732665.471659858.6527 59846.373932735.108014559916.010332747.386859916.0103 59846.373932735.108014559834.095132804.744559834.0951 60250.971432748.304031560321.682132748.30460321.6821 60250.971432748.304031560250.971432819.014760250.9714 60250.971432748.304031560180.260732748.30460180.2607 60250.971432748.304031560250.971432677.593460250.9714 0.00000.00000VALUEVALUE0.0000 59846.373932935.68731559881.729232996.924659881.7292 59846.373932935.68731559785.136732971.042759785.1367 59846.373932935.68731559811.018632874.450159811.0186 59846.373932935.68731559907.611132900.33259907.6111 60232.670132933.277910560171.432932968.633360171.4329 60232.670132933.277910560197.314832872.040760197.3148 60232.670132933.277910560293.907432897.922660293.9074 60232.670132933.277910560268.025532994.515260268.0255 59903.731532677.750421559891.452832608.11459891.4528 59903.731532677.750421559973.36832665.471659973.3680 59903.731532677.750421559916.010332747.386859916.0103 59903.731532677.750421559834.095132690.029259834.0951 60248.562032730.342733060316.863232748.64460316.8632 60248.562032730.342733060230.260732798.64460230.2607 60248.562032730.342733060180.260732712.041460180.2607 60248.562032730.342733060266.863232662.041460266.8632 37452050.0000.0000.000 37451950.0000.0000.000 37451950.0000.0000.000 37452050.0000.0000.000 37452050.0000.0000.000 37451950.0000.0000.000 37451950.0000.0000.000 37452050.0000.0000.000 37452050.0000.0000.000 37451950.0000.0000.000 37451950.0000.0000.000 37452050.0000.0000.000 37452050.0000.0000.000 37451950.0000.0000.000 37451950.0000.0000.000 37452050.0000.0000.000 0.0000.000 37452050.0000.0000.000 37451950.0000.0000.000 37451950.0000.0000.000 37452050.0000.0000.000 37452050.0000.0000.000 37451950.0000.0000.000 37451950.0000.0000.000 37452050.0000.0000.000 37452050.0000.0000.000 37451950.0000.0000.000 37451950.0000.0000.000 37452050.0000.0000.000 37452050.0000.0000.000 37451950.0000.0000.000 37451950.0000.0000.000 37452050.0000.0000.000 00 00 y0 32985.68730.00000.0000 32985.68730.00000.0000 32885.68730.00000.0000 32885.68730.00000.0000 33006.39800.00000.0000 32935.68730.00000.0000 32864.97670.00000.0000 32935.68730.00000.0000 32722.82930.00000.0000 32665.47160.00000.0000 32747.38680.00000.0000 32804.74450.00000.0000 32748.30400.00000.0000 32819.01470.00000.0000 32748.30400.00000.0000 32677.59340.00000.0000 0.0000VALUEVALUE 32996.92460.00000.0000 32971.04270.00000.0000 32874.45010.00000.0000 32900.33200.00000.0000 32968.63330.00000.0000 32872.04070.00000.0000 32897.92260.00000.0000 32994.51520.00000.0000 32608.11400.00000.0000 32665.47160.00000.0000 32747.38680.00000.0000 32690.02920.00000.0000 32748.64400.00000.0000 32798.64400.00000.0000 32712.04140.00000.0000 32662.04140.00000.0000 弧度sincostan象限x1y1 1.0471975510.8660254040.5 1.7320511 00 2.0943951020.866025404-0.5 -1.732052 --00 4.188790205-0.866025404-0.5 1.7320513 --00 5.235987756-0.8660254040.5 -1.732054 --00 59858.652732665.4716 59916.010332747.3868 59834.095132804.7445 59776.737532722.8293 x2y2atan弧度旋转角度 局部象限 12 1.1071487 1.107149 1.047198 -12 -1.107149 2.034444 2.094395 -1-2 1.1071487 4.2487414.18879 1-2 -1.107149 5.176037 5.235988
展开阅读全文