Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Calling out the dimension of the chamfer by Dimlinear!

26 REPLIES 26
SOLVED
Reply
Message 1 of 27
Anonymous
2134 Views, 26 Replies

Calling out the dimension of the chamfer by Dimlinear!

(defun C:C1 ()

(setvar "cmdecho" 0)
(setq osm (getvar "osmode"))

(setq e (car (entsel "\nSelect chamfer:")))
(setq f (entget e))
(setq s (cdr (assoc 10 f)))
(setq s1 (cdr (assoc 11 f)))
(setvar "osmode" 0)
(command "dimlinear" "" s s1 "")
(setvar "osmode" osm)
(setvar "cmdecho" 1)
(princ)
)

-------------------

Hi,

 

I am trying to change new command for my calling chamfer dim that I have to calling out a lot of dimensions of chamfer corners everyday. I tried lisp above and it only can choose one edge and calling out dimension by one direction. I wish I can choose an area, enter and then all chamfer corners will be dimensioned by Dimlinear or Quickselect command.

 

Thank you.

 

chamfer.png

26 REPLIES 26
Message 21 of 27
Anonymous
in reply to: Kent1Cooper

Other questions arise:

 

Would all the chamfered corner pieces always be shorter than all the "main" edges?  Since it would not be able to limit consideration to edges that are not orthogonal, the length comparison could be crucial to deciding which are the chamfered edges.

-->For all the diagonal lines, They will be called out the dimensions!

 

By the wording "choose an area," are you picturing picking within an area, or selecting the Lines that define it [or a Polyline that defines it, if you change to using those]?  If by picking within an area, a routine would almost certainly use BOUNDARY or BPOLY to draw a Polyline to work with, anyway.

-->Choose an area-->I mean that pick from a point to another point as fig. below:

Untitled.png

Message 22 of 27
Anonymous
in reply to: hak_vz

@ВeekeeCZ , @hak_vz After some days using this lisp, I found that the fillets are aslo called out the dimensions and for the polyline created inside the parts are not deleted at last. See the picture below:

Untitled.png

Message 23 of 27
Kent1Cooper
in reply to: Anonymous


@Anonymous wrote:

....

-->For all the diagonal lines, They will be called out the dimensions!

.... 


That contradicts Message 10.  The long left-side edge is diagonal, but is not a chamfer corner.

Kent Cooper, AIA
Message 24 of 27
Anonymous
in reply to: Kent1Cooper

Would all the chamfered corner pieces always be shorter than all the "main" edges-->This will be okay but sometimes it does not works! A fig. below if main edges 8 & 5, the chamfer related to them will not be called out the dimension? As fig. in Message 10, sometimes we meet that kind of drawing, therefore, ->For all the diagonal lines, They will be called out the dimensions! -->will be Okay to me!

I am sorry for this trouble and take your time! Thank you very much for your support!

 

Untitled.png

Message 25 of 27
ВeekeeCZ
in reply to: Anonymous

What may help is increasing the fuzz. It's this line

(not (equal (rem (+ 0.01 g) (/ pi 2)) 0. 0.02))

Fuzz is in radians. The first number should be about a half the last one.

Message 26 of 27
Anonymous
in reply to: Anonymous

@Kent1Cooper Is it possible for this lisp that we discussed? I am waiting for your version!

 

MERRY CHRISTMAS & BEST WISHES FOR YOU!

Message 27 of 27
ВeekeeCZ
in reply to: Anonymous

We can't help if you're not listening. If I ask for dwg, I have a good reason. So post the dwg, not a picture. If Kent has some question, answer them all as best as you can.

 

So again, post a dwg with let's say 50 shapes that you need to dimension. Then we could see the pattern and figure out some clever algorithms - if possible. Otherwise, good luck! 

 

 

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report