Dave^ Posted August 24, 2012 Posted August 24, 2012 Hi Gents, Long time no pester!! I'm looking for a "easier" way of changing specific dimensions to read "right-to-left" and be positioned "below" the dim line. Due to mvsetup, when rotating my views in my viewports, text on the Y-axis is upside down. I know there's an way to change properties, i have "(vlax-property-available-p x 'explodable)" in a lisp (which I think I got from here) to change blocks from not being able to be exploded. I've wasted an hour searching for a solution to a 5min problem... Any hints? Quote
Lee Mac Posted August 24, 2012 Posted August 24, 2012 Try this Dave: (defun c:dimupd ( / sel ) (if (ssget "_:L" '((0 . "DIMENSION"))) (progn (vlax-for obj (setq sel (vla-get-activeselectionset (vla-get-activedocument (vlax-get-acad-object)))) (vla-put-dimtxtdirection obj :vlax-true) (vla-put-verticaltextposition obj acunder) ) (vla-delete sel) ) ) (princ) ) (vl-load-com) (princ) Quote
Dave^ Posted August 24, 2012 Author Posted August 24, 2012 Legend, thanks Lee... 1 virtual Friday pint for you!!! Quote
Dave^ Posted August 24, 2012 Author Posted August 24, 2012 Oh, by the way... Part of my hour search earlier was playing Mastermind... So thanks for that too!! Quote
Lee Mac Posted August 24, 2012 Posted August 24, 2012 Happy to assist with your procrastination Quote
mailmaverick Posted December 2, 2013 Posted December 2, 2013 Dear Lee, From where did you get to know about "vla-put-dimtxtdirection", "vla-put-verticaltextposition" and acunder properties ? The biggest problem in Visual LISP is that proper listing of all functions along with their explanation and properties are not available anywhere properly. Quote
OMEGA-ThundeR Posted October 21, 2016 Posted October 21, 2016 Great piece of code there Lee Mac, i would like however to it being able to change it back with the same command. Something like If (Dimension is normal) { - Change view direction to Right-to-Left - Change Text pos vert to Below } else if (Dimension is allready changed) { - Change view direction back to Left-to-Right - Change Text pos vert back to Above } Would that be possible? (ofcourse it would ) And how? Quote
Lee Mac Posted October 24, 2016 Posted October 24, 2016 Great piece of code there Lee Mac, i would like however to it being able to change it back with the same command. Try the following: (defun c:dimupd ( / sel ) (if (ssget "_:L" '((0 . "DIMENSION"))) (progn (vlax-for obj (setq sel (vla-get-activeselectionset (vla-get-activedocument (vlax-get-acad-object)))) (vlax-put obj 'dimtxtdirection (~ (vlax-get obj 'dimtxtdirection))) (if (= acunder (vla-get-verticaltextposition obj)) (vla-put-verticaltextposition obj acabove) (vla-put-verticaltextposition obj acunder) ) ) (vla-delete sel) ) ) (princ) ) (vl-load-com) (princ) 1 Quote
lamensterms Posted August 12, 2020 Posted August 12, 2020 Very nice routine Lee, thank you very much for providing it. Quote
francine2013 Posted November 3, 2021 Posted November 3, 2021 Hello, I'm looking to find a way to align multiple dimension text. The reason is that I'm using the Viewport and all dimension aren't visible. Attached are 2 drawings explaining my problem, to change the position, I manually copied the coordinates in the properties and inserted them in the dimensions I wanted to change. Is it possible, by using the text position X or Y coordinate, to modify by lisp the other dimensions? I have started the routine from this forum but I don't know how to make it work. I have no idea how to program lisp. Can somebody help me please. Many thank DimensionAlignManualy.dwg Dimension.dwg DimTextMove.lsp Quote
BIGAL Posted November 4, 2021 Posted November 4, 2021 Not sure but dim hor 2 points, then Base pick 1st dim then pick next pt, next pt all done. Quote
francine2013 Posted November 4, 2021 Posted November 4, 2021 Hello Bigal, I think your proposal is not what I'm looking for. When I'm working on the model space I would like to move the dimension text (in red) to the same x position as the visible dimension Quote
BIGAL Posted November 4, 2021 Posted November 4, 2021 Could read the dim string sort on that then edit the order, updating the dimension location, a doable task, but for me do it right in 1st place. Quote
francine2013 Posted November 5, 2021 Posted November 5, 2021 I found a lisp on the Autodesk forum but it works only with horizontal dimension. How to change this lisp so that it works for both cases? Autodesk Forum : https://forums.autodesk.com/t5/autocad-forum/lisp-routine-to-slide-dimension-text/td-p/5189789 tt.lsp Quote
francine2013 Posted November 5, 2021 Posted November 5, 2021 this is what I'm exactly looking for but I can't get the lisp to work, the DTA command doesn't appear Quote
BIGAL Posted November 6, 2021 Posted November 6, 2021 (edited) If you have the lisp is it open code or a FAS ? If open look for C:DTA or something similar that is the function command name after the c : Edited November 6, 2021 by BIGAL Quote
francine2013 Posted November 6, 2021 Posted November 6, 2021 (edited) Hi Bigal Here the lisp that I upload, but in Vlx format. And c:DTA is not working DTA (v1.0).VLX Edited November 6, 2021 by francine2013 Quote
francine2013 Posted November 6, 2021 Posted November 6, 2021 Gile solved my request with a lisp at the end of the following page: https://cadxp.com/topic/53420-aligner-les-textes-de-cotation-en-modifiant-les-propriétés-des-coordonnées-du-texte/ 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.