iconeo Posted August 13, 2015 Share Posted August 13, 2015 I'm stuck on this so any help is appreciated. (defun c:plancallout () ;set variables (setq layername "S-ANNO-SYMB") (setq layercolor "140") (setq restoreosmode (getvar "OSMODE")) (setq recradius "0.25") (if (= (getvar "cvport") 1) (setq recfillet "0.25") (setq recfillet (* (atof recradius) (getvar "dimscale"))) ) ;create layer if it does not exist (setq laysrch (tblsearch "layer" layername)) (if (= laysrch nil) (command ".layer" "n" layername "C" layercolor "") ) ;draw plan callout (setvar "OSMODE" 0) (command "rectangle" "f" recfillet) (command ".chprop" s "" "la" layername "lt" "hidden" "") (command "rectangle" "f" "0" nil) (setvar "OSMODE" restoreosmode) (princ) ) These two lines don't seem to work which are supposed to set the layer and linetype and also set the rectangle fillet setting back to zero. (command ".chprop" s "" "la" layername "lt" "hidden" "") (command "rectangle" "f" "0" nil) Thanks. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted August 14, 2015 Share Posted August 14, 2015 A suggestion (command "-layer" "LT" "hidden" layername "") (setvar "filletrad" 0.0) Quote Link to comment Share on other sites More sharing options...
iconeo Posted August 14, 2015 Author Share Posted August 14, 2015 Thanks for looking. (command "-layer" "LT" "hidden" layername "") Yea I know I can do this, but I was trying to change the object after it was created. Oh well. (setvar "filletrad" 0.0) This doesn't affect the rectangle fillet setting. Any other ideas? Quote Link to comment Share on other sites More sharing options...
BKT Posted August 14, 2015 Share Posted August 14, 2015 Looked like you were creating the rectangle by choosing two cursor points, but I couldn't get it to work in BricsCAD without adding a couple of pauses. I also added ENTLAST to the chprop command. ;; plancallout (defun c:plancallout () ;set variables (setq layername "S-ANNO-SYMB") (setq layercolor "140") (setq restoreosmode (getvar "OSMODE")) (setq recradius "0.25") (if (= (getvar "cvport") 1) (setq recfillet "0.25") (setq recfillet (* (atof recradius) (getvar "dimscale"))) ) ;create layer if it does not exist (setq laysrch (tblsearch "layer" layername)) (if (= laysrch nil) (command ".layer" "n" layername "C" layercolor layername "") ;; added layername ) ;draw plan callout (setvar "OSMODE" 0) (command "rectangle" "f" recfillet pause pause) ;; added pauses (command ".chprop" (entlast) "" "la" layername "lt" "hidden" "") ;; changed "s" to (entlast) (command "rectangle" "f" "0" nil) (setvar "OSMODE" restoreosmode) (princ) ) Quote Link to comment Share on other sites More sharing options...
iconeo Posted August 14, 2015 Author Share Posted August 14, 2015 (command "rectangle" "f" recfillet pause pause) ;; added pauses This made all of my code work. Thanks! Quote Link to comment Share on other sites More sharing options...
BKT Posted August 14, 2015 Share Posted August 14, 2015 Glad it helped! Quote Link to comment Share on other sites More sharing options...
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.