Autocad Contour Lisp
It does not work well in this lisp code. The label displayed twice in close polyline. I should label one in close polyline. (defun c:CLB (/ ss i ed p) (vl-load-com) (prompt ' nSelect Contour. ') (if (setq ss (ssget ':L' '((0. 'LWPOLYLINE')))) (repeat (setq i (sslength ss)) (setq ed (entget (ssname ss (setq i (1- i))))) (foreach x (list (car (setq p (vl-remove-if '((x) (/= (car x) 10)) ed))) (last p)) (entmakex (list '(0.
'CONTOUR LABEL') (cons 1 (rtos (cdr (assoc 38 ed)) 2 3)) (cons 40 (getvar 'textsize')) x );_ end of list );_ end of entmakex );_ end of foreach );_ end of repeat );_ end of if (princ) );_ end of defun. Hi Sanju, try this code (vl-load-com) (defun c:ContoursLabel (/ ss i en p0 p1) (if (and (princ ' nSelect Contours, ') (setq ss (ssget ':L' '((0.
Autocad contour lisp in Description. Outline ART,applied in CAD word processing,is a tool to transform words and symbols into vector-contour. DWGTOOL Software provides both windows desktop version and ARX embedded version for AutoCAD(supporting R14 / R2000 / R2002 / R2004 / R2005 / R2006),so that words and symbols can be transformed. Dec 16, 2009 - Basically this lisp takes the 'z' elevation of a contour and places the. Your C:LAB with the C:CEI that I spiffed up and put at AutoCAD Wiki.
'*POLYLINE')))) (not (command '_.-LAYER' '_N' 'Contour_RL' '_C' 6 ' ')) ) (repeat (setq i (sslength ss)) (setq en (ssname ss (setq i (1- i))) p0 (vlax-curve-getStartPoint en) p1 (vlax-curve-getEndPoint en)) (foreach x (if (equal p0 p1 ) (list p0) (list p0 p1)) (entmakex (list '(0. 'Contour_RL') (cons 1 (rtos (nth 2 x) 2 3)) (cons 40 2) (cons 10 x)))))) (princ) ). (vl-load-com) (defun c:ContoursLabel (/ ss i en p0 p1) (if (and (princ ' nSelect Contours, ') (setq ss (ssget ':L' '((0.
'*POLYLINE')))) (not (if (tblobjname 'LAYER' 'Contour_RL') nil (command '_.-LAYER' '_N' 'Contour_RL' '_C' 6 ' '))) ) (repeat (setq i (sslength ss)) (setq en (ssname ss (setq i (1- i))) p0 (vlax-curve-getStartPoint en) p1 (vlax-curve-getEndPoint en)) (foreach x (if (equal p0 p1 ) (list p0) (list p0 p1)) (entmakex (list '(0. 'Contour_RL') (cons 1 (rtos (nth 2 x) 2 3)) '(40. 2) (cons 50 (/ pi 4)) (cons 10 x)))))) (princ) ). (vl-load-com) (defun c:ContoursLabel (/ ss i en p0 p1) (if (and (princ ' nSelect Contours, ') (setq ss (ssget ':L' '((0. '*POLYLINE')))) (not (if (tblobjname 'LAYER' 'Contour_RL') nil (command '_.-LAYER' '_N' 'Contour_RL' '_C' 6 ' '))) ) (repeat (setq i (sslength ss)) (setq en (ssname ss (setq i (1- i))) p0 (vlax-curve-getStartPoint en) p1 (vlax-curve-getEndPoint en)) (foreach x (if (equal p0 p1 ) (list p0) (list p0 p1)) (entmakex (list '(0. 'Contour_RL') (cons 1 (rtos (nth 2 x) 2 3)) '(40.
2) (cons 50 (/ pi 4)) (cons 10 x)))))) (princ) ). My version: (defun c:Test (/ _t ss i sn st nd);; Tharwat;; (defun _t (p s) (entmake (append '((0. 'Contour_RL') (40. 0.785398) (7.
'Standard') (71. 0) ) (list (cons 1 (rtos s 2 3)) (cons 10 p) (cons 11 p) ) ) ) ) (princ ' nSelect Polylines:') (if (setq ss (ssget '((0. 'POLYLINE')))) (repeat (setq i (sslength ss)) (setq sn (ssname ss (setq i (1- i))) st (vlax-curve-getstartpoint sn) nd (vlax-curve-getendpoint sn) ) (if (vlax-curve-isclosed sn) (_t nd (caddr nd)) (mapcar '_t (list st nd) (mapcar 'caddr (list st nd)) ) ) ) ) (princ) ). Wrote: Since I'm still not come to taste mapcar and lambda, so tell me what is your attitude better if not just different.
I am sorry BeekeeCZ, I did not mean any offense when I shared / posted my attempt in this thread. I did not see you last codes because we posted almost at the same time and I saw a new reply from the OP asking about the rotation, I decided to post my that I wrote a few hours ago and I was outside the office and when I came back I posted the codes. In regard to your question about the differences or about the use of mapcar & lambda, actually I just used mapcar when I THINK it is much more powerful than foreach function although there is no difference between the both of them in performance / outcome.
For more information about ProgID, refer to this link: ProgID Key At last, import your customized xml file: Dism.exe /Online /Import-DefaultAppAssociations:C: FileAssociations.xml In addition, here is a blog for your reference: Windows 8: Associate a file Type or protocol with a specific app using GPO (e.g:default mail client for MailTo protocol) Kate Li TechNet Community Support. Hkeylocalmachine software clients mail default program associations for kids. Hi, Regarding current situation, I suggest we directly edit the exported Fileassociation.xml file, and import to change to what you want: Dism.exe /Online /Export-DefaultAppAssociations:C: FileAssociations.xml Open the XML file in notepad. Hi, Regarding current situation, I suggest we directly edit the exported Fileassociation.xml file, and import to change to what you want: Dism.exe /Online /Export-DefaultAppAssociations:C: FileAssociations.xml Open the XML file in notepad. We have gone into the control panel to try and fix this, but when we choose to change the program the only options we get are Keep using Default Host Application, or Look for an app in the store, the machines have UAC disabled so the store option is out, is there a way to add additional applications to said list? Find the protocol you want to change like: We can find the progID (you want to change to) under HKEY_LOCAL_MACHINE SOFTWARE Classes in regedit.