comcu Posted October 26, 2008 Posted October 26, 2008 Hello All!!! I have a little vba module for creating windows using pick point. the proiblem is the sizes are exact... for example there always 0.49mm out. know i can work with this but i find it annoying and was wonder if anyone new why? i have attached a drawing and vba project if anyone has time to have a look. just run the UFcreateSglWinElev form and press the play button. pick two point, bottom let, top right and then close the form and you will see the window is of the exact pick points by 0.5mm (approx) I don no if is a problem with the code or if im not selecting correctly but i thought if you use snaps it will snap to exact coordinates? thanks for any help, Col. AutoDrawWin.zip Quote
hendie Posted October 26, 2008 Posted October 26, 2008 haven't checked your routine but are you turning snaps off before you are creating the lines ? edit - (must read entire post before replying!) - yes you are using snaps - turn them off before creating the lines and see what happens Quote
comcu Posted October 26, 2008 Author Posted October 26, 2008 hendie, thank you for your response. If i turn off snaps how can i select the points i need to run the procedure? cheers, col Quote
CmdrDuh Posted October 27, 2008 Posted October 27, 2008 turn the snaps off after you have selected the points, but before you draw the line. It might be snapping to osnaps while drawing the lines even though you picked the points using the snaps Quote
BIGAL Posted October 28, 2008 Posted October 28, 2008 Definately check osnaps "off" Autocad has a nasty habit depending on even the zoomed scale your working at to grab an object. Like wise if to far out scale, snaps sometimes will not work. Check the value of the 2 points and make sure they are correct. Also check grid is off maybe its set to some odd value. Quote
comcu Posted October 28, 2008 Author Posted October 28, 2008 Than you boh you. I will have a look into help on how to control osnap from vba. thanks very much. Col Quote
BIGAL Posted October 29, 2008 Posted October 29, 2008 Not sure of exact vba code but here it is in lisp (setq oldsnap (getvar "osmode")) (setvar "osmode" 0) no osnaps code here (setvar "osmode" oldsnap) resets it back again Quote
BIGAL Posted October 29, 2008 Posted October 29, 2008 Found it I think oldsnap = ThisDrawing.GetVariable "OSMODE" ThisDrawing.SetVariable "OSMODE", 0 Quote
comcu Posted October 29, 2008 Author Posted October 29, 2008 Thanks very much guys i will incoporate it into my code. I have done a similiar module for doors so i will be able to add it to both, hopefully that will get rid of the .0455mm's!!!! I will let you know if it does the trick. Cheers, Col. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.