Jump to content

Recommended Posts

Posted

i am not able to create radial dim.

code:

(command "circle" '(0 0 0) 100)

(command "dimradius" (entlast) '(200 100 0))

 

i am not getting error but radial dim is not created.

 

help me.

Posted

How about:


(vl-cmdf "_.circle" "_non" '(0 0 0) 100)
(vl-cmdf "_.dimradius"

(ssname (ssget "L") 0)
 '(200 100 0)
 )

Posted

I think perhaps:

 

(command "_.circle" "_non" '(0. 0. 0.) 100.)
(command "_.dimradius" (list (entlast) '(100. 0. 0.)) "_non" '(200. 100. 0.))

Posted

thanks it works,

 

can u explain '(100. 0. 0.)??

i cant understand

Posted

Mine code is working on my end with no problems as well (A2010/2009)

Posted
Mine code is working on my end with no problems as well (A2010/2009)

 

Sorry Fixo, yours works too :oops:

 

@kalai: '(100. 0. 0.) is a point on the circle - I would suggest using Fixo's method though.

Posted

sorry fixo,

your code also works

thank you

 

but i have a collection of circles of varying radius to be dimensioned.

how shall i proceed?

 

 

Also i have change the text ht and arrow size?

Posted (edited)

Glad if so

You have to create selection set

something like:

(setq sset (ssget (list (cons 0 "circle"))))

then loop through selected items usual way

(while (setq en (ssname sset 0))
(setq elist (entget en)
center (cdr (assoc 10 elist))
rad (cdr (assoc 10 elist)
pt (polar center 0 rad))
(vl-cmdf "_.dimradius"
(ssname (ssget "pt) 0)
pt )
(ssdel en sset)
);end while

Cheers :)

Edited by fixo
code added
Posted

fixo,

 

but i have a collection of circles of varying radius to be dimensioned.

how shall i proceed?

 

 

Also i have change the text ht and arrow size?

Posted

FIXO ,

 

iam getting error at this point,

(vl-cmdf "_.dimradius"

(ssname (ssget "pt) 0)

pt )

pls check,

Posted

Maybe use:

 

(defun c:test ( / ss i e p r )
 (if (setq ss (ssget '((0 . "CIRCLE"))))
   (repeat (setq i (sslength ss))
     (setq e (ssname ss (setq i (1- i)))
           p (cdr (assoc 10 (entget e)))
           r (cdr (assoc 40 (entget e)))
     )
     (vl-cmdf "_.dimradius" (list e (polar p 0 r)) "_non" (polar p 0 r))
   )
 )
 (princ)
)

Posted
FIXO ,

 

iam getting error at this point,

(vl-cmdf "_.dimradius"

(ssname (ssget "pt) 0)

pt )

pls check,

Sorry I wrote it without editor

Try instead

(defun C:mdrad(/ cp elist en pt rad sset)
(if (setq sset (ssget '((0 . "circle"))))
 (while
   (setq en (ssname sset 0))
   (setq elist (entget en)
  cp (cdr (assoc 10 elist))
  rad (cdr (assoc 40 elist))
  pt (trans (polar cp (/ pi 4) rad) 1 0))
    (vl-cmdf "_.dimradius"
      (ssname (ssget pt '((0 . "circle"))) 0)
      pt
      )
    (ssdel en sset)
   )
 )
(princ)
)

  • 6 years later...
Posted

pls, can you explain why "_non" and whay '(200. 100. 0.))

i cant understand

Posted

lee mec tks. and now '(200 100 0)?

Posted

'(200 100 0) is a literal list representing the 3D coordinate (200, 100, 0).

Posted

now understand. tks Lee Mac

Posted

Now l want creat a lisp using DIMARC with just points.l not want click in arc, l want click just in points.

 

Lee Mac can you help me again?

Posted

if l have

 

(setq list_1(assoc 8 "red"))

 

l can subst

 

(setq list_1(entmod(subst(cons 8 "green")(assoc 8 list_1)list_1)))

 

 

but, how can l subst (10 6433.43 9440.89 0)

(10 0 0 0) ?????

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