Author Topic: add radius into Arc Length Dimension  (Read 2460 times)

0 Members and 1 Guest are viewing this topic.

Big G

  • Bull Frog
  • Posts: 415
add radius into Arc Length Dimension
« on: August 31, 2014, 07:56:48 PM »
Monday morning headache (maybe i need more coffee!)

The standard Dim->ArcLength  gives the length of the arc.....Does anyone know of a way to add in another field below it to add the Radius of said arc, so as to avoid lengthy tables of setouts and double dimensioning.....

|  14250 |   - Length
     R20        - Radius Field (field to keep it dynamically updated)

Cheers

I thought i seen the light at the end of the tunnel. But it was just someone with a torch bringing me more work.
"You have to accept that somedays youre the pigeon and  somedays youre the statue"

ChrisCarlson

  • Guest
Re: add radius into Arc Length Dimension
« Reply #1 on: September 02, 2014, 08:25:49 AM »
Under insert field and select object, simply select arc radius?


Big G

  • Bull Frog
  • Posts: 415
Re: add radius into Arc Length Dimension
« Reply #2 on: September 04, 2014, 12:52:12 AM »
Close ... no cigars today though - Its contained within an xref so i cant pick the individual entity (the arc)

Appreciate the input tho....

G

I thought i seen the light at the end of the tunnel. But it was just someone with a torch bringing me more work.
"You have to accept that somedays youre the pigeon and  somedays youre the statue"

Bethrine

  • Guest
Re: add radius into Arc Length Dimension
« Reply #3 on: September 04, 2014, 10:15:15 AM »
How about this?

ronjonp

  • Needs a day job
  • Posts: 7528
Re: add radius into Arc Length Dimension
« Reply #4 on: September 04, 2014, 11:29:55 AM »
Close ... no cigars today though - Its contained within an xref so i cant pick the individual entity (the arc)

Appreciate the input tho....

G

Label it within the xref ?

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

ChrisCarlson

  • Guest
Re: add radius into Arc Length Dimension
« Reply #5 on: September 05, 2014, 11:03:17 AM »
Close ... no cigars today though - Its contained within an xref so i cant pick the individual entity (the arc)

Appreciate the input tho....

G

If you can't select the entity can you simply trace, select and delete the trace?

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: add radius into Arc Length Dimension
« Reply #6 on: September 05, 2014, 03:06:55 PM »
Down and dirty...

Code: [Select]
(defun c:TEst (/ _massoc obj dic arc)

  (defun _massoc (x lst)
    (if lst
      (if (eq (caar lst) x)
        (cons (car lst) (_massoc x (cdr lst)))
        (_massoc x (cdr lst))
      )
    )
  )

  (setq obj (entlast))

  (command "_.dimarc")
  (while (eq (logand 1 (getvar 'CMDACTIVE)) 1) (command PAUSE))

  (if (and (not (equal obj (setq obj (entlast))))
           (eq (vla-get-HasExtensionDictionary (setq obj (vlax-ename->vla-object obj))) :vlax-true)
           (setq dic (vla-getExtensionDictionary obj)
                 arc (vlax-ename->vla-object
                       (cdar (vl-remove-if-not
                               (function (lambda (x) (member (cdr (assoc 0 (entget (cdr x)))) '("ARC" "LWPOLYLINE"))))
                               (_massoc 331 (entget (vlax-vla-object->ename (vla-getobject dic "ACAD_DIMASSOC"))))
                             )
                       )
                     )
           )
      )

    (vla-put-textoverride
      obj
      (strcat "L= <>\\PR= %<\\AcObjProp Object(%<\\_ObjId "
              (if (vl-string-search "64" (getenv "PROCESSOR_ARCHITECTURE"))
                (vla-getobjectidstring
                  (vla-get-utility (vla-get-activedocument (vlax-get-acad-object)))
                  arc
                  :vlax-false
                )
                (itoa (vla-get-objectid arc))
              )
              ">%).Radius \\f \"%lu2\">%"
      )
    )
  )

  (princ)
)
(vl-load-com)
(princ)
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox