Jojo Posted Thursday at 03:40 PM Posted Thursday at 03:40 PM Please help with lisp. I'm looking for an offset or a copy lsp that can offset an object, and I can highlight all the text and ignore the "+". Thank you in advance. Recording2.mp4 Quote
Jojo Posted Thursday at 03:40 PM Author Posted Thursday at 03:40 PM (edited) 4 hours ago, Jojo said: Please help with lisp. I'm looking for an offset or a copy lsp that can offset an object, and I can highlight all the text and ignore the "+". Thank you in advance. The previous lsp I had is when I offset it... It makes if bigger or smaller because its an offset, so what I'm actually doing is to copy an object (copy command) and type the distance which is a lot of typo due to typing all the numbers. any help would be greatly appreciated. thank you Recording2.mp4 Sample2.dwgSample2.dwgSample2.dwgSample2.dwgSample2.dwg Edited Thursday at 08:02 PM by Jojo Quote
Jojo Posted Thursday at 03:41 PM Author Posted Thursday at 03:41 PM Hello again. I'm using Carlson software, and I attached a dwg for sample. Quote
GLAVCVS Posted Friday at 07:16 AM Posted Friday at 07:16 AM '...highlight all the text and ignore the "+"....' ? Can you clarify that? Quote
BIGAL Posted Friday at 07:48 AM Posted Friday at 07:48 AM This is a long section sample but with no line work etc, doesn't the Carlson software do what you want, if not maybe CIV3D or Civil Site Design as an alternative. Quote
Jojo Posted Friday at 08:59 PM Author Posted Friday at 08:59 PM 13 hours ago, BIGAL said: This is a long section sample but with no line work etc, doesn't the Carlson software do what you want, if not maybe CIV3D or Civil Site Design as an alternative. Hi Bigal. Carlson doesn't do what I want it to do, and I don't have Civil 3D. Quote
Jojo Posted Friday at 09:33 PM Author Posted Friday at 09:33 PM 14 hours ago, GLAVCVS said: '...highlight all the text and ignore the "+"....' ? Can you clarify that? Recording4.mp4 GLAVCVS. I was hoping to find lsp that can copy this object, and I can just highlight all the text and move it to all these different distances and will ignore the "+" sign, or just dont worry about the "+". Thank you. Quote
Saxlle Posted Saturday at 09:11 AM Posted Saturday at 09:11 AM (edited) @Jojo Try this: (prompt "\nTo run LISP type: MCODIST") (defun c:MCODIST ( / old_copyMode old_osmode copyEntity basePoint side sign old_nomutt ss len i data position_+ stringOne stringTwo stringConcate) (setq old_copyMode (getvar 'copymode) old_osmode (getvar 'osmode) ) (setvar 'copymode 1) (setq copyEntity (car (entsel "\nPick the copy entity:")) basePoint (getpoint "\nPick the base point:") ) (initget 1 "Left Right") (setq side (getkword "\nChoose side for copy [Left/Right]:")) (if (= side "Left") (setq sign -) (setq sign +) ) (setq old_nomutt (getvar 'nomutt)) (setvar 'nomutt 1) (princ "Select all Text entities:") (setq ss (ssget '((0 . "*TEXT"))) len (sslength ss) i 0 ) (setvar 'nomutt old_nomutt) (setvar 'osmode 0) (while (< i len) (setq data (cdr (assoc 1 (entget (ssname ss i)))) position_+ (vl-string-position (ascii "+") data) ) (if (/= position_+ nil) (progn (setq stringOne (substr data 1 position_+) stringTwo (substr data (+ position_+ 2) (strlen data)) stringConcate (strcat stringOne stringTwo) ) (command-s "_copy" copyEntity "" basePoint (list (sign (car basePoint) (atof stringConcate)) (cadr basePoint) (caddr basePoint))) ) ) (setq i (1+ i)) ) (setvar 'copymode old_copyMode) (setvar 'osmode old_osmode) (prompt (strcat "\nThe entity was copied " (itoa len) " times!")) (princ) ) bandicam 2025-02-01 10-08-33-989.mp4 Best regards. Edited Saturday at 09:49 PM by Saxlle Something weird with video upload Quote
BIGAL Posted Saturday at 10:27 PM Posted Saturday at 10:27 PM Yes no video action. Just post an image. Quote
Saxlle Posted 18 hours ago Posted 18 hours ago Here is a video example how it works. MCODIST.mp4 Quote
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.