dxf group pts, hard coded vari
Hey folkshave three questions today hopefully you's can provide some insight into at least one of them
1. Once a list of points has been derived from a lwpolyline i'd like to use these points to select objects within the parameters of the entity whilch the points where derived from. I can't figure out how to enter all the points into a command. Can this be done or could someone provide an alternative method for this task>
2. At my work the rest of the staff use Anvil; an old tablet driven program for any 2D work. I don't have the eyesigth for effective use of the tablet or the will power to learn such a backward CAD package. Before creatingthe iges file the parts are set to levels (layers on Autocad) rangedfrom 11-49. Rather than having to hard code a variable for each program that requires at least one variable for each layer , for example a selection set for each. I was hoping there is a way to create the variables by use of a loop with a cntr?
3. Smartcam is not a big fan of sharp edge on profiles therefore there has to be a fillet on each corner or change in angle. is there a way to gather these points?
Any help will be greatly appreciated.
Thanks,
Ollie. 1. You need function like this:
(defun GetLwPolyVertexes(Ename) (mapcar 'cdr(vl-remove-if '(lambda(x)(/= 10(car x)))(entget Ename))) ); end of GetLwPolyVertexes
Try in command line:
Command: (GetLwPolyVertexes(car(entsel)))Select object: ((-227861.0 168724.0) (-217784.0 173601.0) (-215580.0 167702.0) (-209597.0 168567.0) (-212746.0 174466.0) (-220855.0 178792.0) (-227074.0 174702.0))
2. Variable for each layer? For example variable for layer 11:
(setq L11 (sssetfirst nil (ssget "_X" '((8 . "11"))))) Thanks for the input. I tried the first two and couldn't seem to get anything to happen iwith them. i've been using a pice of code to this effect to get the points
(setq Ent_group (entget(car(entsel))))(foreach a Ent_group(if (= 10 (car a)) (setq verlist(append verlist(list(cdr a)))))The main problem i am having is a can't create a fence selection from the points for example i thought this might have worked, it didn't
("command"move""f"verlist"")As for thelast part i was hoping you could elaborae on how it worked a bit, most of my lisp knowledge is based on excessive lengths of time using trial and error and i don't have a clue how i would implement such code. the the selection set i would be using for each layer would roughly be.
(Setq break_check_10 (ssget "x" '( (-4 . "") ) ) ) Look this http://www.cadtutor.net/forum/showthread.php?t=11682 and http://www.cadtutor.net/forum/showthread.php?t=14070 for examples. Those examples are great, thanks
页:
[1]