简体   繁体   English

c# + autocad 镜像命令

[英]c# + autocad mirror command

var commandString = string.Format("_.mirror _C\r{0}\r{1}\r {2}\r{3} _n\r",
                pEnd.ToString2D(), pStart.ToString2D(), axialPStart.ToString2D(), axialPEnd.ToString2D());
            _acadCurrentDocument.SendCommand(commandString);

does not work, i believe it is because \r.不起作用,我相信这是因为 \r. How to pass trough this situation?如何度过这种情况?

I don't have an AutoCAD handy to test here, but I believe \r alone is not recognized by the command interpreter as a press on the ENTER key.我没有方便的 AutoCAD 在这里进行测试,但我相信命令解释器不会单独将\r识别为按下ENTER键。 Try using \n instead:尝试使用\n代替:

"_.mirror _C\n{0}\n{1}\n {2}\n{3} _n\n"

Replace the spaces in your expression with \r and check that osmode is at zero because the two points of your capture can be the same用 \r 替换表达式中的空格并检查 osmode 是否为零,因为捕获的两个点可以相同

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM