lamensterms Posted September 25, 2019 Posted September 25, 2019 (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? (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: Thanks for any help ARC Running Dimensions.dwg Edited October 1, 2019 by lamensterms Added image Quote
lamensterms Posted September 25, 2019 Author Posted September 25, 2019 The forum seems to be rejecting a single line of my code: Sorry for the spam guys Quote
BIGAL Posted September 26, 2019 Posted September 26, 2019 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 ? Quote
lamensterms Posted September 26, 2019 Author Posted September 26, 2019 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. Quote
CADTutor Posted September 26, 2019 Posted September 26, 2019 @marko_ribar the 403 error has been resolved and you should now be able to post code as normal. Quote
BIGAL Posted September 27, 2019 Posted September 27, 2019 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. Quote
lamensterms Posted October 4, 2019 Author Posted October 4, 2019 Thanks for the replies guys. I am interested in creating the running dimensions around the arc - is that what you are decribing BigAl? Quote
BIGAL Posted October 4, 2019 Posted October 4, 2019 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 Quote
lamensterms Posted October 10, 2019 Author Posted October 10, 2019 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? Quote
BIGAL Posted October 10, 2019 Posted October 10, 2019 (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 October 10, 2019 by BIGAL 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.