Sambuddy Posted November 21, 2019 Share Posted November 21, 2019 how do I get the first part to work? how do I combine the two? How do I have it so first pline is drawn/executed, followed by then (c2 command) measure command to insert specific block and then (c3 command) which is offset on both sides and delete original is executed? as you can see it looks so bad... please help (defun c:c2 (/ d1) (setq d1 (entget (car (entsel)))) (setq d2 (command "_.measure" "d1" "B" "Tx - Dalle béton + tapis" "Y" "1200" "")) ) (vl-load-com) (defun c:c3 ( / *error* of undo doc ss ) (defun *error* ( msg ) (and undo (vla-EndUndomark doc)) (or (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*") (princ (strcat "\n** Error: " msg " **"))) (princ)) (if (and (ssget '((0 . "ARC,CIRCLE,ELLIPSE,*LINE"))) (setq of (getdist "\nSpecify Offset Distance: "))) (progn (setq undo (not (vla-StartUndomark (setq doc (vla-get-ActiveDocument (vlax-get-acad-object)))))) (vlax-for obj (setq ss (vla-get-ActiveSelectionSet doc)) (mapcar (function (lambda (o) (vl-catch-all-apply (function vla-offset) (list obj o)))) (list of (- of))) (vla-delete obj)) (setq undo (vla-EndUndoMark doc)))) (princ) ) Quote Link to comment Share on other sites More sharing options...
BIGAL Posted November 21, 2019 Share Posted November 21, 2019 Did not look to hard at code but add at end. (defun c:do-cs () (c:c2) (c:c3) ) Quote Link to comment Share on other sites More sharing options...
Tharwat Posted November 22, 2019 Share Posted November 22, 2019 Hi, If you are referring to Electrical Cable Tray program then you can try my program: Electrical Cable Program 1 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.