Jump to content

Arc Running or Ordinate Dimensions


Recommended Posts

Posted (edited)

Hey guys,

 

Quite sure ACAD doesn't support this natively - so figured I'd ask here.

 

Just wondering if anyone knows of a way (or has a custom routine) that will add running dimensions to ARC dimensions?

 

I use a routine to create the ARC dimenions (different to ACAD's DIMARC command - code below).

 

Is it possible to create ARC RUNNING DIMENSIONS?

 

image.thumb.png.e29e8d6602683096d91f1610c04ee549.png

 

 (defun c:ad (/ arc sel ent arc rad ang len)

 (prompt "\nDIMARC\n")
 (while (not arc) ;trap to catch an arc
 (while (null (setq sel (entsel "\nSelect arc: "))))
 (setq ent (entget (car sel)))
 (if (= "ARC" (cdr (assoc 0 ent)))
 (setq arc T)
 (princ "\nInvalid selection.")
 )
 )
 (setq rad (cdr (assoc 40 ent)))
 (setq ang (- (cdr (assoc 51 ent))(cdr (assoc 50 ent)) ) )
 (if (minusp ang)(setq ang (+ ang (* 2 pi))))
 ;(setq len (strcat (rtos (* ang rad) (getvar "dimunit")(getvar "dimdec")) "\\PLENGTH"))
 (setq len (strcat (rtos (* ang rad) 2 0) "\\X{\\H.71429x;\\C7;ARC R" (rtos rad 2 0) "}"))
 ;(setq len (strcat (rtos (* ang rad) 2 0)))

 (command "_.dimangular" sel "T" len pause)
 (princ)

 ); end defun

 

Sorry for adding the code as an image - forum wouldn't let me insert it as code, quote or plain text... kept getting 403 error:

 

image.png.cba564b653cdf5d8afc8641f7fd05df1.png

Thanks for any help

 

 

 

ARC Running Dimensions.dwg

 

Edited by lamensterms
Added image
Posted

The forum seems to be rejecting a single line of my code:

 

image.thumb.png.698f6f56578a2cbb072a4f545560f202.png

 

Sorry for the spam guys

Posted

It would be a custom answer, the obvious to me is do ask 1/4 or pick points, the other thing to check for is pull arc details out of a pline. 

 

So its 1 arc with answers above and below ? Need some idea of dim offset values ? 

 

 

 

Posted

Hey BigAl, thanks for the reply.

 

I've added the DWG to the original post.

 

My ARC dimension routine works by picking a single ARC for each dimension.  I don't really have a method for DIMCONTINUE for ARCs - it's really one-at-a-time.

 

In the example, there are 4 ARCs (in line), and I would like to attempt to add a running dimension for the total of these 4 ARCs.

 

Having a tricky time explaining it - hopefully I'm not confusing everyone.

Posted

Dimangular is your friend,

 

Pick the arcs in order do outside 1st using dimang

 

Make a new single arc = arc1+arc2 dimang pick inside delete arc

Make a new single arc arc1+arc2+arc3 dimang pick 2*inside delete arc

keep going making new arc

 

NOTE a single arc not pline as dimang will do segments not total.

 

Just thinking more make arcs into pline and get vertices, then convert back to arcs. Use the vertices to make 3 point arcs.

Posted

Thanks for the replies guys.

 

I am interested in creating the running dimensions around the arc - is that what you are decribing BigAl?

Posted

To use dimangular you pick object so need a single arc 1st a double arc as one  next and so on a triple arc as one next for as many as you have.

 

If you pedit the arcs dimangular recognises the segments not the combined.

 

So something like pick

1st dim top

pick 2nd dim top

pick till end doin top dim

Pedit the arcs that have been picked,  build a list of points explode pline if you need as single arcs.

Use the vertices 1 2 3 dimangular

use the vertices 1 2 4  dimangular

use the vertices 1 2 5  dimangular

 

 

Posted

Hey BIGAL,

 

Thanks for the reply.

 

Quote

To use dimangular you pick object so need a single arc

 

I agree and understand - my 'DIMARC' routine is based on picking a single ARC.

 

I'm afraid I'm still not really following your instructions through, please see sketch below.  I am attempting/hoping to create the running dimensions around an ARC - the numbers highlighted by the green circles below.  Is this what you are describing?

image.thumb.png.929fa843eb2e7a9393a615f27a9c3b49.png

Posted (edited)

The green numbers are a bit easier to work out, if you pick the arcs in order then each arc has a Arclength note not length as a property, so its easy to work out the running chainage. 

 

Its probably easiest to just pick and write the answer. 

 

(defun foo ( / len)
(setq len 0)
(alert "Start ch is 0.0")
(while (setq obj (vlax-ename->vla-object (car (entsel "pick arc"))))
(setq len (+ len (vla-get-arclength obj)))
(alert (strcat "run ch is " (rtos len 2 2)))
)
)
(foo)

 

Edited by BIGAL

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