notview Posted October 28, 2013 Share Posted October 28, 2013 I can't find a lisp "Offset multiple objects on a given point". Any generous help, I need offset like this: Select the objects (lines or polylines). Get/pick a point. Ask object interval distance. Then, from the source object to a picked point is the Distance to be filled up. e.g.: Distance to be filled up is 101m.; Object interval distance is 2m. Then, from the source object up to distance 100m are now filled. It was only filled up to 100m because additional of 2m is 102m, it is now more than to the Distance to be filled. Quote Link to comment Share on other sites More sharing options...
danielk Posted October 28, 2013 Share Posted October 28, 2013 I can't find a lisp "Offset multiple objects on a given point". Any generous help, I need offset like this: Select the objects (lines or polylines). Get/pick a point. Ask object interval distance. Then, from the source object to a picked point is the Distance to be filled up. e.g.: Distance to be filled up is 101m.; Object interval distance is 2m. Then, from the source object up to distance 100m are now filled. It was only filled up to 100m because additional of 2m is 102m, it is now more than to the Distance to be filled. maybe this one: ;; ARRANG by David Harrington ;;; Array objects at any angle at a giving distance ;;; ;;; Main Program ;;; (defun c:ara (/ x ent ang num dist pt1 dist1 pt2 ang_error olcmdecho olosmode) (defun ang_error (msg) (if (or (= msg "Function cancelled") (/= msg "quit / exit abort")) (princ (strcat "Error: " msg)) ) (command "._UNDO" "E" "UNDO" "") (setvar "CMDECHO" olcmdecho) (setvar "OSMODE" olosmode) (setq *error* old_err old_err nil ) (princ) ) (setq old_err *error* *error* ang_error ) (setq olosmode (getvar "OSMODE") olcmdecho (getvar "CMDECHO") ) (setvar "CMDECHO" 0) (command "._UNDO" "BE") (prompt "\n Arrang - Array objects at an angle") (setq x 1) (princ "\nSelect objects to Array: ") (cond ((setq ent (ssget)) (initget 1) (setq ang (getangle "\nAngle to array objects: ")) (initget 1) (setq num (getint "\nNumber of objects to array: ")) (initget 1) (setq dist (getdist "\nDistance between objects: ")) (setq pt1 (getvar "lastpoint")) (setq dist1 dist) (setq pt2 (polar pt1 ang dist1)) (setvar "osmode" 0) (while (/= num x) (command "._COPY" ent "" pt1 pt2) (setq dist1 (+ dist dist1)) (setq pt2 (polar pt1 ang dist1)) (setq x (+ x 1)) ) ) ) (command "._UNDO" "E") (setvar "OSMODE" olosmode) (setvar "CMDECHO" olcmdecho) (setq *error* old_err) (princ) ) (princ) Quote Link to comment Share on other sites More sharing options...
notview Posted October 29, 2013 Author Share Posted October 29, 2013 It's good, but this is what I want. After the select of object, no need to ask angle to array and number ofobjects to array. Only DISTANCE BETWEEN OBJECTS (or objects interval) and the Perpendicular Distancebetween the picked point and object are needed. Number of objects will be determined by: PERPENDICULAR DISTANCE FROM PICKEDPOINT TO THE OBJECT / DISTANCE BETWEEN OBJECTS. The QUOTIENT (only whole number, forget the decimal) is the number ofobjects to be offset/filled. The side where you make a picked point is the side where to make an offsetobjects. Quote Link to comment Share on other sites More sharing options...
ReMark Posted October 29, 2013 Share Posted October 29, 2013 (edited) Until you find exactly what you are looking for maybe Lee Mac's custom lisp routine called Dynamic Offset would suffice. Check it out....http://lee-mac.com/dynamicoffset.html CADstudio has a lisp utility called XOffset. "XOffset creates multiple offsets to the selected objects, in the specified distance. You can specify whether to make the offset inwards or outwards for the selected closed polylines. The offset is drawn in the current layer." Find it here.... http://www.cadstudio.cz/en/download.asp?file=XOffset Edited October 29, 2013 by ReMark Quote Link to comment Share on other sites More sharing options...
notview Posted October 29, 2013 Author Share Posted October 29, 2013 Nice custom lisp! L.M., If you could make additional option Pick a point either inner or outer of the object, and from that object to the picked point will be filled up that depend on chosen offset distance. And that's great!! Quote Link to comment Share on other sites More sharing options...
ReMark Posted October 29, 2013 Share Posted October 29, 2013 I take it you are asking Lee Mac if he would be willing to tweak his present code for the Dynamic Offset lisp routine. Yes? Quote Link to comment Share on other sites More sharing options...
notview Posted October 29, 2013 Author Share Posted October 29, 2013 ReMark, Yes! Quote Link to comment Share on other sites More sharing options...
ReMark Posted October 29, 2013 Share Posted October 29, 2013 Well that is entirely up to Lee. He is under no obligation to do so. Can't say for sure when and if he may see/respond to this thread. You'll just have to be patient. Quote Link to comment Share on other sites More sharing options...
notview Posted October 29, 2013 Author Share Posted October 29, 2013 Ok, thank you ReMark. I will wait L.M. respond. Quote Link to comment Share on other sites More sharing options...
ReMark Posted October 29, 2013 Share Posted October 29, 2013 Seeing how you have 55 posts you can PM him. Ask nicely. People who are demanding normally don't get very far around here. If he should decline just take it in stride. OK? Quote Link to comment Share on other sites More sharing options...
notview Posted October 29, 2013 Author Share Posted October 29, 2013 Ok ReMark, thank you for your reminders.. Quote Link to comment Share on other sites More sharing options...
notview Posted November 5, 2013 Author Share Posted November 5, 2013 Quote Link to comment Share on other sites More sharing options...
notview Posted November 5, 2013 Author Share Posted November 5, 2013 Any help would be greatly appreciated. (Pls. see attached fig.) Quote Link to comment Share on other sites More sharing options...
ReMark Posted November 5, 2013 Share Posted November 5, 2013 And the question is.......? Sorry, but my telepathic powers are disrupted due to increased solar activity. What lisp routine are you using? Quote Link to comment Share on other sites More sharing options...
notview Posted November 5, 2013 Author Share Posted November 5, 2013 This moment, I'm using the Lee Mac lisp, DynOffV2-1. I just make assumption on the (N)umber of offset. If ever did dot filled the total length, I just run it again.. Enter..Select the last object & Enter.. Quote Link to comment Share on other sites More sharing options...
ReMark Posted November 5, 2013 Share Posted November 5, 2013 What do you need help with? Quote Link to comment Share on other sites More sharing options...
troggarf Posted November 5, 2013 Share Posted November 5, 2013 I see from the screen shot that you are using AutoCAD 2012. You are in Luck, because this is now part of the copy command!!! See the links below: http://autocadtips.wordpress.com/2011/03/24/autocad-2012-copy-tool-with-array-option/ http://autocadtips.wordpress.com/2011/03/24/autocad-2012-copy-with-array-fit/ ~Greg Quote Link to comment Share on other sites More sharing options...
rkent Posted November 5, 2013 Share Posted November 5, 2013 Using array with associative set to on would be your best bet. After the fact you can make adjustments to the number of objects, or spacing, etc. Quote Link to comment Share on other sites More sharing options...
dvpluto Posted November 6, 2013 Share Posted November 6, 2013 @notview try this code Function Syntax: caa (defun cpar( / ss1 a d di n std ) (setq cmdo(getvar "cmdecho")) ;(command "_.ucs" "") (setvar "cmdecho" 0) (princ "\nCopy array:") (setq ss1(ssget)) (setq p1(getpoint "First point: ")) (setq p2(getpoint p1 "Second point: ")) (if ca:distance (progn (setq std (rtos ca:distance 2 4)) (setq d(getdist (strcat "Distance between elements<"std ">: "))) (if d (setq ca:distance d) ) );end progn (setq ca:distance(getdist "Distance between elements: ")) );end if (setq a(angle p1 p2)) (setq a(* (/ 180 pi) a)) (command "_.ucs" "z" a) (setq di (distance p1 p2)) (setq d ca:distance) (setq n(/ di d)) (setq n(+ 1(atoi (rtos n 2 1)))) (command "_.array" ss1 "" "r" 1 n d) (command "_.ucs" "") (setvar "cmdecho" cmdo) (princ) );end defun (defun c:caa() (cpar) ) Quote Link to comment Share on other sites More sharing options...
notview Posted November 6, 2013 Author Share Posted November 6, 2013 (edited) Thank you Greg, I learned something an additional command using copy & array in cad. Copy and option array was almost same to Lee Mac Lisp. Thanx rkent for the ideas.. dvpluto, you are almost there! This routine is asking two points and that is good. And asking for the distance between elements, copying an array and filled equally the picked two points. After that, I noticed the interval or distance between elements was a bit changed. If you could give me some favor, can you make some changes.. Pls., distance between elements is a parallel distance. Your effort is highly appreciated!! Edited November 6, 2013 by notview 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.