In the drawing DrawInteractive mode, I understand there is a snap option design1.GridSnapEnabled = true; for the MyDesign:Design design1 to ensure the line can be drawn as a straight line. However for the case when my start point is not on the grid snap (Let's say my intend is to have it not stay on the grid), I want to force the cursor movement horizontally by pressing the Shift Key or anything, how the code can be implemented?
How do I force the cursor to move Horizontally Drafting Demo 2022.2 using Shift Key?
109 Views Asked by N.TW12 At
1

You can modify the mouseLocation variable as follows:
I would insert this method at the beginning of OnMouseMove() and at the beginning of the OnMouseDown().