Author Topic: Ordinate Dimensioning and Plotting to Extents  (Read 1910 times)

0 Members and 1 Guest are viewing this topic.

MWorland

  • Mosquito
  • Posts: 6
Ordinate Dimensioning and Plotting to Extents
« on: December 21, 2010, 03:25:46 PM »
I'm revisiting a lisp, that I can not get to work. i am trying to "hide" the points in all ordinate dims so when i do a zoom extents the dim points will not affect the outcome.
In the code below I can put the point on a frozen layer and change it to not be visible and it still affects my zoom extents. I have also tried to erase them, and they are erased, but AutoCAD still 'sees' them. When the dim is modified the points come back. Any thoughts?
Code: [Select]
(defun c:OrdinNoPoint (/ ssOrdDim intincrement objBlockReference)
  (setq ssOrdDim (ssget "X" '((0 . "DIMENSION"))))
  (setq intIncrement 0)
  (repeat (sslength ssOrdDim)
(if (= 6 (logand (cdr (assoc 70 (entget (ssname ssOrdDim intIncrement)))) 6));Choose only ordinate dimensions
  (progn
(setq objBlockReference (vla-item (vla-get-blocks (vla-get-activedocument (vlax-get-acad-object)))
(cdr (assoc 2 (entget (ssname ssOrdDim intIncrement))))))
(vlax-for objItem objBlockReference
  (if (= "AcDbPoint" (vla-get-objectname objItem))
(progn
  (vla-put-visible objItem :vlax-false)
  (vla-put-layer objItem "LayFrzn")
  (vla-update objItem)
  (vla-regen (vla-get-activedocument (vlax-get-acad-object)) acactiveviewport)
)
  )
)
  )
)
(setq intIncrement (1+ intIncrement))
  )
  (princ)
)



thanks,
matt worland

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Ordinate Dimensioning and Plotting to Extents
« Reply #1 on: December 21, 2010, 04:12:30 PM »
Maybe if you zoom the title block?
Change to your title block name.
Code: [Select]
(defun c:ztb (/ LL UR tbName)           ; zoom title block
  (vl-load-com)
  (setq tbName "Aproved Title Block D- Attr")
  (if (setq ss (ssget "_X"
         (list (cons 2 tbName) '(0 . "INSERT") (cons 410 (getvar "ctab")))))
    (progn
      (vla-getboundingbox (vlax-ename->vla-object (ssname ss 0)) 'LL 'UR)
      (vla-zoomwindow (vlax-get-acad-object) LL UR)
    )
  )
  (princ)
)
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

hermanm

  • Guest
Re: Ordinate Dimensioning and Plotting to Extents
« Reply #2 on: December 22, 2010, 10:07:34 PM »
One possible workaround is to use a block for the elevation callout instead of an ordinate dimension.
Example block attached.
Thought I wrote some code to calculate the attribute value from the insertion point, but i can't seem to find it at the moment.
Easy enough to do, and you could get as fancy as you like, with reactors to update the attribute upon moving the insertion point, etc.

<shrug> just an option..

Another (purely drafting) trick:

Suppose your elevations are all in the range 800'<900'
Define a child dimension style for ordinates only with a prefix of 8.
Then you can set your origin to 0' & 35' will display as 835'
Kludgy, doesn't work if first digit can have >1 value.

Worst potential problem, as i see it, is grabbing that "lonely" defpoint by mistake & moving/stretching it , thereby screwing up all you elevations.

If you have all your ordinate dimensions set, & don't plan to change any of them, you could override the dimension text, then stretch the origin defpoints to your liking.

I posted a routine here recently which overrides dimension text with a string showing the measurement, if you want to do it that way.

Probably none of these is what you wanted to hear. :|
« Last Edit: December 22, 2010, 10:26:51 PM by hermanm »

MWorland

  • Mosquito
  • Posts: 6
Re: Ordinate Dimensioning and Plotting to Extents
« Reply #3 on: March 01, 2011, 01:49:43 PM »
Thank you for the suggestions, but our office really likes using the ordinate dimensions, and our blocks are not clean/consistent enough to use the bounding box. I tried that method for a while, but it wasnt always consistent. This will be my fall back and I will clean up our title blocks.

I am getting a little closer to understanding my problem though. I have realized that I can run the code and it will shut off the nodes, but zoom and plot extents are still affected by the nodes. Now I have noticed that if I erase the dimensions and then undo the erase AutoCAD does a better job at updating the dimension and my nodes are gone and now I can zoom or plot extents. Oops does not update the dimension and I have the same problem as before.

Is it possible that I need to update the dimension and if so what would be the easiest way to get back to the dimension to try and update it?

Thanks again,
matt worland


barc

  • Guest
Re: Ordinate Dimensioning and Plotting to Extents
« Reply #4 on: March 02, 2011, 01:02:56 PM »
I use ordinates for all manner of stuff, especially on 3D models.  I never plot extents; never quite know what you're getting.  I use page setups in the templates and define a precise window in the pagesetup for plotting.  Most of the time I never look at the settings beyond the pagesetup name and just hit plot.  Works well in batch mode and publishing, and will also work inside other applications like DWGTRUEVIEW.