zwonko Posted February 14 Posted February 14 (edited) Had written simple lisp which is inserting block and making ordinate dimension. Code: (defun c:dorykota (/ scal scaletrjk H off pt ptx pty ptmt curlay) (setq scal (getint "\nSet drawing scale: ")) (setq scaletrjk scal) (setq off (* 1.3 scal)) (setq curlay (getvar "CLAYER")) (setvar "CLAYER" "9 kreskowanie - szare") (while (setq pt (getpoint "\select point")) (setq ptx (car pt)) (setq pty (+ (cadr pt) off)) (setq ptmt (list ptx pty 0)) (princ ptmt) (command "_.insert" "trójkąt wysokościowy zakresk" pt scaletrjk "" "0") (command "_DIMORDINATE" pt "y" ptmt) ) (setvar "CLAYER" curlay) (princ) ) The thing is that sometimes it makes dimension not in correct position. See picture: Ok are good, other one, even same point clicked not. Don't know why. Could somebody check it? Edited February 14 by zwonko Quote
pkenewell Posted February 14 Posted February 14 (edited) @zwonko Try changing the following 2 lines to add "_non" right before the pt variable; this disables the object snaps so the point will be put exactly where the coordinates specify: (command "_.insert" "trójkąt wysokościowy zakresk" "_non" pt scaletrjk "" "0"); <--- add "_non" before pt to disable osnaps (command "_DIMORDINATE" "_non" pt "y" "_non" ptmt); <--- add "_non" before pt and ptmt to disable osnaps P.S. if that is not working. I will need a sample drawing with that block in it to test. Edited February 14 by pkenewell 1 Quote
zwonko Posted February 15 Author Posted February 15 Work like a charm! Thank You! it was so annoying. 1 Quote
pkenewell Posted February 15 Posted February 15 6 hours ago, zwonko said: Work like a charm! Thank You! it was so annoying. Great! Glad it worked for you! 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.