liuhaixin88 Posted April 22, 2014 Author Share Posted April 22, 2014 After adding the two slide images go back to Autocad and copy and paste the following into your command line and let me know the outcome . (findfile "Round DisConnection.sld") Or this . (findfile "Cut DisConnection.sld") (findfile "Round DisConnection.sld") "E:\\program files\\autocad 2010\\support\\Round DisConnection.sld" (findfile "Round DisConnection.sld") "E:\\program files\\autocad 2010\\support\\Round DisConnection.sld" Quote Link to comment Share on other sites More sharing options...
Tharwat Posted April 22, 2014 Share Posted April 22, 2014 That is good so far and nothing is wrong . How did you run the vlx file ? Quote Link to comment Share on other sites More sharing options...
liuhaixin88 Posted April 22, 2014 Author Share Posted April 22, 2014 That is good so far and nothing is wrong . How did you run the vlx file ? (findfile "PDC.VLX") "E:\\program files\\autocad 2010\\support\\PDC.VLX" appload-----pdc.vlx, command: pdc Warning -----Cna't run the code .................. Quote Link to comment Share on other sites More sharing options...
Tharwat Posted April 22, 2014 Share Posted April 22, 2014 The problem may lay in the language of your PC , anyway load this function and let me know the outcome . (defun PathOfSupportFolder (/ cad p l) (setq cad (getenv "ACAD")) (while (setq p (vl-string-search ";" cad)) (setq l (cons (substr cad 1 p) l) cad (substr cad (+ 2 p)) ) ) (if l (nth 1 (reverse l)) ) ) (PathOfSupportFolder) Quote Link to comment Share on other sites More sharing options...
liuhaixin88 Posted April 22, 2014 Author Share Posted April 22, 2014 The problem may lay in the language of your PC , anyway load this function and let me know the outcome . (defun PathOfSupportFolder (/ cad p l) (setq cad (getenv "ACAD")) (while (setq p (vl-string-search ";" cad)) (setq l (cons (substr cad 1 p) l) cad (substr cad (+ 2 p)) ) ) (if l (nth 1 (reverse l)) ) ) (PathOfSupportFolder) Y,language is chinese. (PathOfSupportFolder) "D:\\Documents and Settings\\liuhaixin\\application data\\autodesk\\autocad 2010\\r18.0\\chs\\support" Quote Link to comment Share on other sites More sharing options...
Tharwat Posted April 22, 2014 Share Posted April 22, 2014 So add the two slide images in that folder and not in the one that you have posted in earlier before Quote Link to comment Share on other sites More sharing options...
liuhaixin88 Posted April 22, 2014 Author Share Posted April 22, 2014 So add the two slide images in that folder and not in the one that you have posted in earlier before You mean: add two slide images in ""D:\\Documents and Settings\\liuhaixin\\application data\\autodesk\\autocad 2010\\r18.0\\chs\\support" ? Quote Link to comment Share on other sites More sharing options...
liuhaixin88 Posted April 22, 2014 Author Share Posted April 22, 2014 So add the two slide images in that folder and not in the one that you have posted in earlier before OK! NOW IS OK! Thanks! Quote Link to comment Share on other sites More sharing options...
Tharwat Posted April 22, 2014 Share Posted April 22, 2014 You mean: add two slide images in ""D:\\Documents and Settings\\liuhaixin\\application data\\autodesk\\autocad 2010\\r18.0\\chs\\support" ? Yes , and let me know . Quote Link to comment Share on other sites More sharing options...
Tharwat Posted April 22, 2014 Share Posted April 22, 2014 OK! NOW IS OK! Thanks! Excellent , enjoy it . Quote Link to comment Share on other sites More sharing options...
ReMark Posted April 22, 2014 Share Posted April 22, 2014 That didn't take very long now did it? All's well that ends well. Quote Link to comment Share on other sites More sharing options...
liuhaixin88 Posted April 22, 2014 Author Share Posted April 22, 2014 Excellent , enjoy it . This should be your early works . Thanks Tharwat, but how to do thiis ,my Thread. break in middle . (Maybe line or pline) Quote Link to comment Share on other sites More sharing options...
Tharwat Posted April 22, 2014 Share Posted April 22, 2014 That didn't take very long now did it? Another story comes up again Quote Link to comment Share on other sites More sharing options...
liuhaixin88 Posted April 22, 2014 Author Share Posted April 22, 2014 That didn't take very long now did it? All's well that ends well. All's well that ends well ! Quote Link to comment Share on other sites More sharing options...
ReMark Posted April 22, 2014 Share Posted April 22, 2014 You can only make some of the people happy some of the time but not all of the people happy all of the time. Quote Link to comment Share on other sites More sharing options...
liuhaixin88 Posted April 23, 2014 Author Share Posted April 23, 2014 You can only make some of the people happy some of the time but not all of the people happy all of the time. Too esoteric. Quote Link to comment Share on other sites More sharing options...
Tharwat Posted April 24, 2014 Share Posted April 24, 2014 (edited) Try this routine that I just wrote for you purpose . (defun c:test (/ pick p1 s1 p2 s2 p3 s3 p4 s4) ;; Tharwat 24. Apr. 2014 ;; (defun pick (p / s) (if (not (setq s (ssget p '((0 . "LINE,LWPOLYLINE"))))) (progn (princ "\n Should pick a point on Line or Polyline !") nil) t ) s ) (if (and (setq p1 (getpoint "\n Specify first point on [Line,Polyline] :")) (setq s1 (pick p1)) (setq p2 (getpoint "\n Specify opposite point :" p1)) (setq s2 (pick p2)) (setq p3 (getpoint "\n Specify parallel point to first point :")) (if (and (setq p4 (polar p3 (angle p2 p1) (distance p2 p1))) (setq s4 (pick p4)) (equal (cdr (assoc -1 (entget (ssname s1 0)))) (cdr (assoc -1 (entget (ssname s4 0))))) ) t (progn (princ "\n No line found in Point number Four !") nil) ) (if (and (setq s3 (pick p3)) (equal (cdr (assoc -1 (entget (ssname s2 0)))) (cdr (assoc -1 (entget (ssname s3 0))))) ) t (progn (princ "\n Second and third point must be picked on the same Line or Polyline !") nil) ) ) (progn (defun Breakline (p1 p2 / a d f g h j k i p3) (setq d (distance p1 p2) a (angle p1 p2) f (polar p1 (+ pi a) (* 0.5 d)) g (polar p1 a (- (* 0.5 d) (* 0.25 d))) h (polar g (- a (* pi 0.5)) (* 0.25 d)) k (polar p2 a (* 0.5 d)) j (polar p2 (+ pi a) (* 0.25 d)) i (polar j (- a (* 1.5 pi)) (* 0.25 d)) ) (entmake (list '(0 . "LWPOLYLINE") '(100 . "AcDbEntity") '(100 . "AcDbPolyline") '(90 . 4) '(70 . 0) '(43 . 0.0) (cons 10 (list (car p1) (cadr p1))) '(40 . 0.0) '(41 . 0.0) '(42 . -0.414214) (setq p3 (cons 10 (mapcar '(lambda (x y) (/ (+ x y) 2.)) p1 p2))) '(40 . 0.0) '(41 . 0.0) '(42 . 0.498582) (cons 10 (list (car p2) (cadr p2))) '(40 . 0.0) '(41 . 0.0) '(42 . 0.498582) p3 '(40 . 0.0) '(41 . 0.0) '(42 . -0.498582) ) ) ) (if (and (Breakline p1 p2) (Breakline p3 p4)) (foreach x (list (list s1 p1 p4) (list s2 p2 p3)) (vl-cmdf "_.break" (car x) "_F" "_non" (cadr x) "_non" (caddr x)) ) ) ) ) (princ) ) Edited April 24, 2014 by Tharwat Quote Link to comment Share on other sites More sharing options...
liuhaixin88 Posted April 24, 2014 Author Share Posted April 24, 2014 Try this routine that I just wrote for you purpose . (defun c:test (/ pick p1 s1 p2 s2 p3 s3 p4 s4) ;; Tharwat 24. Apr. 2014 ;; (defun pick (p / s) (if (not (setq s (ssget p '((0 . "LINE,LWPOLYLINE"))))) (progn (princ "\n Should pick a point on Line or Polyline !") nil) t ) s ) (if (and (setq p1 (getpoint "\n Specify first point on [Line,Polyline] :")) (setq s1 (pick p1)) (setq p2 (getpoint "\n Specify opposite point :" p1)) (setq s2 (pick p2)) (setq p3 (getpoint "\n Specify parallel point to first point :")) (if (and (setq p4 (list (car p3) (cadr p1) 0.)) (setq s4 (pick p4)) (equal (cdr (assoc -1 (entget (ssname s1 0)))) (cdr (assoc -1 (entget (ssname s4 0))))) ) t (progn (princ "\n No line found in Point number Four !") nil) ) (if (and (setq s3 (pick p3)) (equal (cdr (assoc -1 (entget (ssname s2 0)))) (cdr (assoc -1 (entget (ssname s3 0))))) ) t (progn (princ "\n Second and third point must be picked on the same Line or Polyline !") nil) ) ) (progn (defun Breakline (p1 p2 / a d f g h j k i p3) (setq d (distance p1 p2) a (angle p1 p2) f (polar p1 (+ pi a) (* 0.5 d)) g (polar p1 a (- (* 0.5 d) (* 0.25 d))) h (polar g (- a (* pi 0.5)) (* 0.25 d)) k (polar p2 a (* 0.5 d)) j (polar p2 (+ pi a) (* 0.25 d)) i (polar j (- a (* 1.5 pi)) (* 0.25 d)) ) (entmake (list '(0 . "LWPOLYLINE") '(100 . "AcDbEntity") '(100 . "AcDbPolyline") '(90 . 4) '(70 . 0) '(43 . 0.0) (cons 10 (list (car p1) (cadr p1))) '(40 . 0.0) '(41 . 0.0) '(42 . -0.414214) (setq p3 (cons 10 (mapcar '(lambda (x y) (/ (+ x y) 2.)) p1 p2))) '(40 . 0.0) '(41 . 0.0) '(42 . 0.498582) (cons 10 (list (car p2) (cadr p2))) '(40 . 0.0) '(41 . 0.0) '(42 . 0.498582) p3 '(40 . 0.0) '(41 . 0.0) '(42 . -0.498582) ) ) ) (if (and (Breakline p1 p2) (Breakline p3 p4)) (foreach x (list (list s1 p1 p4) (list s2 p2 p3)) (vl-cmdf "_.break" (car x) "_F" "_non" (cadr x) "_non" (caddr x)) ) ) ) ) (princ) ) Thank you very much! Tharwat, You are my god! I do not know how grateful you, you help me too much! Quote Link to comment Share on other sites More sharing options...
Tharwat Posted April 24, 2014 Share Posted April 24, 2014 Thank you very much! Tharwat, I do not know how grateful you, you help me too much! You're welcome . Quote Link to comment Share on other sites More sharing options...
highflybird Posted April 25, 2014 Share Posted April 25, 2014 (edited) You're welcome . I think can like this: Edited April 25, 2014 by highflybird Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.