开发者

c# + autocad mirror command

开发者 https://www.devze.com 2023-03-10 05:31 出处:网络
var commandString = string.Format(\"_.mirror _C\\r{0}\\r{1}\\r {2}\\r{3} _n\\r\", pEnd.ToString2D(), pStart.ToString2D(), axialPStart.ToString2D(), axialPEnd.ToString2D());
var commandString = string.Format("_.mirror _C\r{0}\r{1}\r {2}\r{3} _n\r",
                pEnd.ToString2D(), pStart.ToString2D(), axialPStart.ToString2D(), axialPEnd.ToString2D());
            _acadCurren开发者_C百科tDocument.SendCommand(commandString);

does not work, i believe it is because \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. Try using \n instead:

"_.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

0

精彩评论

暂无评论...
验证码 换一张
取 消