Jump to content

Recommended Posts

Posted

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

Posted

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

Posted

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

Posted

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

Posted

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.

Posted

Than you boh you.

 

I will have a look into help on how to control osnap from vba.

 

thanks very much.

 

Col

Posted

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

Posted

Found it I think

 

oldsnap = ThisDrawing.GetVariable "OSMODE"

ThisDrawing.SetVariable "OSMODE", 0

Posted

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.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...