(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.
Solved! Go to Solution.
Solved by hak_vz. Go to Solution.
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:
@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.
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!
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.
@Kent1Cooper Is it possible for this lisp that we discussed? I am waiting for your version!
MERRY CHRISTMAS & BEST WISHES FOR YOU!
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.