Jump to content

Recommended Posts

Posted

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... :lol:

 

Any hints?

Posted

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)

Posted

Legend, thanks Lee...

 

1 virtual Friday pint for you!!!

Posted

Oh, by the way...

 

Part of my hour search earlier was playing Mastermind... o:) So thanks for that too!!

  • 1 year later...
Posted

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.

  • 2 years later...
Posted

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 :P) And how?

Posted
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)

  • Thanks 1
  • 3 years later...
Posted

Very nice routine Lee, thank you very much for providing it.

  • 1 year later...
Posted

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

Posted

Not sure but dim hor 2 points, then Base pick 1st dim then pick next pt, next pt all done.

Posted

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

image.thumb.png.3f3d674fbbf40d4c5ed4a0c039bcfcb2.png

 

 

Posted

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. 

Posted

this is what I'm exactly looking for but I can't get the lisp to work, the DTA command doesn't appear

 

Posted (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 by BIGAL
Posted (edited)

Hi Bigal

Here the lisp that I upload, but in Vlx format. And c:DTA is not working

DTA (v1.0).VLX

Edited by francine2013

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...