brianhiroshi Posted March 13, 2009 Share Posted March 13, 2009 Hi, I'm trying to make the dimensions of the draw I created on the Lisp but I don't know how to change its properties. Does someone know how to do it? I'm having another problem too, the command "dimangular" only makes the dimensions if the drawing is properly zoomed, not too close neither too far, otherwise it doesn't accepts the pickpoints I had set. Is ther anyway too solve this problem without having to zoom it manually? Thanks Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted March 13, 2009 Share Posted March 13, 2009 To set dimstyle maybe: (command "-dimstyle" "restore".... etc etc Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted March 13, 2009 Share Posted March 13, 2009 As for the dimangular problem, I would have thought that as long as the points lie on the curve in question, it should be no problem with zooming in or not Quote Link to comment Share on other sites More sharing options...
brianhiroshi Posted March 18, 2009 Author Share Posted March 18, 2009 I've tried dimstyle but I just don't know how to use it in Lisp. Should I create the style and only then load it with dimstyle? Thanks! Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted March 18, 2009 Share Posted March 18, 2009 I suppose you could check its existence using: (if (tblsearch "DIMSTYLE" "[b][i]stylename[/i][/b]") (command "-dimstyle" "restore" "[b][i]stylename[/i][/b]") (princ "\n<!> Dimstyle not found <!>")) does this help at all? Lee Quote Link to comment Share on other sites More sharing options...
brianhiroshi Posted March 25, 2009 Author Share Posted March 25, 2009 Actually I was looking for something like that: (defun layer_set (lyr col ltname) (if (tblsearch "LAYER" lyr) (command ".Layer" "_Thaw" lyr "_UnLock" lyr "_On" lyr "_Set" lyr "") (if (tblsearch "LTYPE" ltname) (command "._Layer" "_Make" lyr "_Color" col lyr "_LT" ltname lyr "") (command "._Layer" "_Make" lyr "_Color" col lyr "_LT" "Continuous" lyr "") ) ) ) That is what I found for layers, if the layer exists it will use it, if not, it will create the layer with the desired features, but I wanted something like that for the dimensionstyle. The problem is that I don't know how to call this features neither if what I want to do is possible... I'm sorry, my english is not that good but I hope you've understood what I'm looking for. Thanks! Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted March 25, 2009 Share Posted March 25, 2009 I suppose to make the new dimstyle you would have to set all the necessary dimension variables how you would like them, and then save it as a new dimension style - but I have never personally done it myself, so I am only guessing. A list of dimension variables can be found here: http://www.74mph.com/faq/FAQ00066.html or here http://www.hyperpics.com/system_variables/ Quote Link to comment Share on other sites More sharing options...
brianhiroshi Posted March 26, 2009 Author Share Posted March 26, 2009 This list can help, I'll try to see if I can change the variables then... Thanks! Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted March 26, 2009 Share Posted March 26, 2009 Good luck, let me know how you get on Quote Link to comment Share on other sites More sharing options...
brianhiroshi Posted April 8, 2009 Author Share Posted April 8, 2009 Hi again, I believe I've found the variables that I'll have to use to set the dimension style, but I still can't find which is the command or function that I need to create the new dimension style. Would you have any idea of how to do it? Thanks Quote Link to comment Share on other sites More sharing options...
Se7en Posted April 8, 2009 Share Posted April 8, 2009 I use a simple conditional like this: ;; give the dimestyle a name. (if (tblsearch "DIMSTYLE" "<YOUR DIMSTYLE NAME>") (command "-dimstyle" "r" "<YOUR DIMSTYLE NAME>") (progn (mapcar 'eval '( (SETVAR "DIMADEC" 0) (SETVAR "DIMALT" 0) (SETVAR "DIMALTD" 2) (SETVAR "DIMALTF" 25.4) (SETVAR "DIMALTRND" 0.0) (SETVAR "DIMALTTD" 2) ; ; ...<snip> All your variables. ; (SETVAR "DIMTXT" 0.03125) (SETVAR "DIMTZIN" 0) (SETVAR "DIMUPT" 0) (SETVAR "DIMZIN" ) ) (command "-dimstyle" "s" "<YOUR DIMSTYLE NAME>") ) ) Quote Link to comment Share on other sites More sharing options...
alanjt Posted April 8, 2009 Share Posted April 8, 2009 i have our dimensions set in our template, but since drawings can be purged, in the startup, i insert all dimensions, etc. through objectdbx. i was wondering, if you make a change to a dimension style in one file, is it possible to bring that into another file and overwrite the existing dimension style (even if it's active), like you would 'redefine' a block? is my only option to redefine the variables i've changed through the setvars? Quote Link to comment Share on other sites More sharing options...
Se7en Posted April 8, 2009 Share Posted April 8, 2009 > ODBX Redefine? Not sure. I will have to set up a test to see, but i assume it would work (redefine). BTW im sure you would have to set the dimstyle to something else and then redefine it. Quote Link to comment Share on other sites More sharing options...
Se7en Posted April 8, 2009 Share Posted April 8, 2009 It doesn't look like `it' will get redefined. I set up a test and copied from one drawing to the current via ODBX and nothing changed. Sorry, looks like your going to have to set variables. ~ Quote Link to comment Share on other sites More sharing options...
alanjt Posted April 8, 2009 Share Posted April 8, 2009 It doesn't look like `it' will get redefined. I set up a test and copied from one drawing to the current via ODBX and nothing changed. Sorry, looks like your going to have to set variables. ~ what i figured. i guess i could rename the dimension style, import the updated style, change all objects that use the old style to the 'new' one and delete the old style. probably easier/safer to just set the variables. thanks John. Quote Link to comment Share on other sites More sharing options...
Se7en Posted April 8, 2009 Share Posted April 8, 2009 what i figured. i guess i could rename the dimension style, import the updated style, change all objects that use the old style to the 'new' one and delete the old style. probably easier/safer to just set the variables. thanks John. Yep its a lot easier. Just modify that conditional above to ensure that you always have the proper settings. Try something like: ( (lambda ( / _dimstyle-setup ) (defun _dimstyle-setup ( / ) (mapcar 'eval '( (SETVAR "DIMADEC" 0) (SETVAR "DIMALT" 0) (SETVAR "DIMALTD" 2) (SETVAR "DIMALTF" 25.4) (SETVAR "DIMALTRND" 0.0) (SETVAR "DIMALTTD" 2) ; ; ...<snip> All your variables. ; (SETVAR "DIMTXT" 0.03125) (SETVAR "DIMTZIN" 0) (SETVAR "DIMUPT" 0) (SETVAR "DIMZIN" ) ) ) (if (tblsearch "DIMSTYLE" "<YOUR DIMSTYLE NAME>") (progn ;; if the dimstyle exists ;; make sure its setup properly (_dimstyle-setup) ;; set it current (command "-dimstyle" "r" "<YOUR DIMSTYLE NAME>") ) (progn ;; otherwise ;; set it up properly (_dimstyle-setup) ;; save it. (command "-dimstyle" "s" "<YOUR DIMSTYLE NAME>") ) ) ) ) Quote Link to comment Share on other sites More sharing options...
brianhiroshi Posted April 15, 2009 Author Share Posted April 15, 2009 What if I wanted to place a symbol in front of the number of the dimension, for example, instead of having only 100 for the dimension I would like to have Ф100mm? Is it possible to make a lisp that inserts the symbols or units? Thanks Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted April 15, 2009 Share Posted April 15, 2009 Alter the DIMPOST variable -- For example: DIMPOST = mm Return for 100 = 100mm DIMPOST = mm Return for 100 = 100mm DIMPOST = mm Return for 100 = mm100 Quote Link to comment Share on other sites More sharing options...
brianhiroshi Posted April 22, 2009 Author Share Posted April 22, 2009 Hi! Thanks, it worked well! Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted April 22, 2009 Share Posted April 22, 2009 Glad it worked for you, anything else, just ask 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.