Jump to content

Search the Community

Showing results for tags 'copy'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • CADTutor
    • News, Announcements & FAQ
    • Feedback
  • AutoCAD
    • AutoCAD Beginners' Area
    • AutoCAD 2D Drafting, Object Properties & Interface
    • AutoCAD Drawing Management & Output
    • AutoCAD 3D Modelling & Rendering
    • AutoCAD Vertical Products
    • AutoCAD LT
    • CAD Management
    • AutoCAD Bugs, Error Messages & Quirks
    • AutoCAD General
    • AutoCAD Blogs
  • AutoCAD Customization
    • The CUI, Hatches, Linetypes, Scripts & Macros
    • AutoLISP, Visual LISP & DCL
    • .NET, ObjectARX & VBA
    • Application Beta Testing
    • Application Archive
  • Other Autodesk Products
    • Autodesk 3ds Max
    • Autodesk Revit
    • Autodesk Inventor
    • Autodesk Software General
  • Other CAD Products
    • BricsCAD
    • SketchUp
    • Rhino
    • SolidWorks
    • MicroStation
    • Design Software
    • Catch All
  • Resources
    • Tutorials & Tips'n'Tricks
    • AutoCAD Museum
    • Blocks, Images, Models & Materials
    • Useful Links
  • Community
    • Introduce Yourself
    • Showcase
    • Work In Progress
    • Jobs & Training
    • Chat
    • Competitions


  • Programs and Scripts
  • 2D AutoCAD Blocks
  • 3D AutoCAD Blocks
  • Images
    • Backgrounds

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...

  1. As posted over at theSwamp, I thought I'd post it here for you guys also CopyText.lsp The program will allow a user to copy the text content from a source object to a selection of destination objects or swap the text content between two objects. The user may select from Text, MText, Attribute, or Multileader objects. Upon choosing 'Settings' the user can alter whether source object formatting should be retained upon copying/swapping to/with objects which permit the use of such formatting. Ideas/criticism/feedback are, as always, welcome Enjoy! Lee CopySwapTextV1-6.lsp
  2. Hello Everyone, Been looking through lee mac's website for helpful lisp routines for work and found this copy2layouts lisp routine he created. When I start the command, it doesn't seem to select any objects I have within the layout for me to copy. Instead, it only selects object in the model space. Can anyone help me with this? And if Lee Mac see this, BIG FAN! Copy2LayoutsV1-1.lsp © 2020 Lee Mac DarkLightVLIDE ;;-----------------------=={ Copy to Layouts }==------------------------;; ;; ;; ;; This program enables a user to quickly copy a selection of objects ;; ;; to all or selected layouts in a drawing. ;; ;; ;; ;; Upon calling the program with 'C2L' at the command line, the user ;; ;; is prompted to make a selection of objects in the active layout to ;; ;; copy. Following selection, the user is prompted, via a dialog ;; ;; interface, to choose one or more layouts to which the objects will ;; ;; be copied. ;; ;; ;; ;; If the program is called with 'C2AL' at the command line, every ;; ;; object in the selection is automatically copied to all layouts ;; ;; in the drawing, without the use of the dialog interface. ;; ;; ;; ;;----------------------------------------------------------------------;; ;; Author: Lee Mac, Copyright © 2013 - www.lee-mac.com ;; ;;----------------------------------------------------------------------;; ;; Version 1.0 - 10-02-2011 ;; ;; ;; ;; First Release. ;; ;;----------------------------------------------------------------------;; ;; Version 1.1 - 08-07-2013 ;; ;; ;; ;; Entire program rewritten. ;; ;;----------------------------------------------------------------------;; (defun c:c2l nil (copy2layouts nil)) ;; Copy to selected layouts (defun c:c2al nil (copy2layouts t)) ;; Copy to all layouts (defun copy2layouts ( all / lst obl sel tab ) (defun *error* ( msg ) (LM:endundo (LM:acdoc)) (if (not (wcmatch (strcase msg t) "*break,*cancel*,*exit*")) (princ (strcat "\nError: " msg)) ) (princ) ) (if (= 1 (getvar 'cvport)) (setq tab (strcase (getvar 'ctab))) (setq tab "MODEL") ) (if (ssget (list (cons 410 tab))) (progn (vlax-for lay (vla-get-layouts (LM:acdoc)) (if (/= tab (strcase (vla-get-name lay))) (setq lst (cons (cons (vla-get-name lay) lay) lst)) ) ) (if (or (and all (setq lst (mapcar 'cdr lst))) (setq lst (mapcar '(lambda ( x ) (cdr (assoc x lst))) (LM:listbox "Choose Layouts to Copy to" (mapcar 'car (vl-sort lst '(lambda ( a b ) (< (vla-get-taborder (cdr a)) (vla-get-taborder (cdr b)))))) t ) ) ) ) (progn (vlax-for obj (setq sel (vla-get-activeselectionset (LM:acdoc))) (setq obl (cons obj obl)) ) (vla-delete sel) (LM:startundo (LM:acdoc)) (foreach lay lst (vlax-invoke (LM:acdoc) 'copyobjects obl (vla-get-block lay))) (LM:endundo (LM:acdoc)) ) ) ) ) (princ) ) ;;-----------------------=={ List Box }==---------------------;; ;; ;; ;; Displays a List Box allowing the user to make a selection ;; ;; from the supplied data. ;; ;;------------------------------------------------------------;; ;; Author: Lee Mac, Copyright © 2012 - www.lee-mac.com ;; ;;------------------------------------------------------------;; ;; Arguments: ;; ;; title - List Box Dialog title ;; ;; lst - List of Strings to display in the List Box ;; ;; multiple - Boolean flag to determine whether the user ;; ;; may select multiple items (T=Allow Multiple) ;; ;;------------------------------------------------------------;; ;; Returns: List of selected items, else nil. ;; ;;------------------------------------------------------------;; (defun LM:ListBox ( title lst multiple / dch des tmp res ) (cond ( (not (and (setq tmp (vl-filename-mktemp nil nil ".dcl")) (setq des (open tmp "w")) (write-line (strcat "listbox : dialog { label = \"" title "\"; spacer; : list_box { key = \"list\"; multiple_select = " (if multiple "true" "false") "; } spacer; ok_cancel; }" ) des ) (not (close des)) (< 0 (setq dch (load_dialog tmp))) (new_dialog "listbox" dch) ) ) (prompt "\nError Loading List Box Dialog.") ) ( t (start_list "list") (foreach item lst (add_list item)) (end_list) (setq res (set_tile "list" "0")) (action_tile "list" "(setq res $value)") (setq res (if (= 1 (start_dialog)) (mapcar '(lambda ( x ) (nth x lst)) (read (strcat "(" res ")"))) ) ) ) ) (if (< 0 dch) (unload_dialog dch) ) (if (and tmp (setq tmp (findfile tmp))) (vl-file-delete tmp) ) res ) ;; Start Undo - Lee Mac ;; Opens an Undo Group. (defun LM:startundo ( doc ) (LM:endundo doc) (vla-startundomark doc) ) ;; End Undo - Lee Mac ;; Closes an Undo Group. (defun LM:endundo ( doc ) (while (= 8 (logand 8 (getvar 'undoctl))) (vla-endundomark doc) ) ) ;; Active Document - Lee Mac ;; Returns the VLA Active Document Object (defun LM:acdoc nil (eval (list 'defun 'LM:acdoc 'nil (vla-get-activedocument (vlax-get-acad-object)))) (LM:acdoc) ) ;;----------------------------------------------------------------------;; (vl-load-com) (princ (strcat "\n:: Copy2Layouts.lsp | Version 1.1 | \\U+00A9 Lee Mac " (menucmd "m=$(edtime,$(getvar,date),YYYY)") "\n:: Available Commands:" "\n:: \"C2L\" - Copy to selected layouts." "\n:: \"C2AL\" - Copy to all layouts." ) ) (princ) ;;----------------------------------------------------------------------;; ;; End of File ;; ;;----------------------------------------------------------------------;;
  3. Hi! Avid reader of the forums, first time poster. I have a code with which I'm trying to extract the x and y coordinate of the startpoint of a line to the clipboard for pasting into another program. The problem is that when I run the lisp in Civil 3D it spits out when running (caddr typelst) on line 6 in the code below. What could cause this. I'm having trouble understanding why it wouldn't be able to grab the type from the list. The code: (vl-load-com) (defun c:copyx1y1 () (setq choice (entsel "Choose the line whose start X and Y you want to copy \n")) (setq entname (car choice)) (setq typelst (assoc 0 (entget entname))) (if (= (caddr typelst) "LINE") (progn (setq startpnt (assoc 10 (entget entname))) (setq x1 (cadr startpnt)) (princ "\n") (princ x1) (princ "\n") (setq y1 (caddr startpnt)) (princ y1) (setq copiedtxt (strcat (rtos x1) "\t" (rtos y1))) (setq result (vlax-invoke (vlax-get (vlax-get (setq htmlfile (vlax-create-object "htmlfile")) 'ParentWindow) 'ClipBoardData) 'SetData "Text" copiedtxt) ) (vlax-release-object htmlfile) copiedtxt ) (progn (princ "The choice is not of type LINE") ) ) (princ) ) Regards, E
  4. Hi Guys, i have this problem. in my work, i need to use layers for the design, and sometimes i copy objects from other drawings, when i paste the objects in current drawing, they are pasted in their original layer, and then i need to change the layers of all the pasted objects to the current (active) layer. well, it doesn't sound very handful, but when i need to copy and paste a lot of them, it is quite a work to do. so, does anyone have a lisp routine that can do this; when i do the paste operation, it automatically changes the layer of the objects in clipboard into the current layer or say active layer? many thanks!
  5. Newbie to forum but not to CAD. I need a copy lisp that will add the entered dimension accumulatively. Example: Command; copy, pick object(s), pick base point, enter displacement, "10 foot", first click copies in a direction at ten foot, then twenty, thirty, forty, etc.... I would like to be able to do this without having to snap to the last copied object (as the standard copy command would be used for). The type of work I do, the drawings can be very busy and snaps can move too easily. The other reason is for speed. Hopefully I have been clear in what I need. Thanks for the help with this one and thank you for the help I've already taken from this website. -Nobull
  6. Hello everyone. I am working with a code to copy object (s) and paste with rotation using the same base point as the axis of rotation. What I can't do is create a while cycle to be able to make multiple copies and rotate. I could only do it once. If someone helps me a little I would be very grateful. (defun c:cr (/ ss p1 p2 p3) (setq ss (ssget)) (command "copy" ss "" "0" "0") (setq p1 (getpoint "\n base Point: ")) (setq p2 (getpoint "\n destination point: ")) (command "move" ss "" p1 p2) (setq p3 (getpoint "\n reference point: ")) (command "rotate" ss "" p2 "R" "@" p3 pause) )
  7. Yesterday by AutoCAD crashed and since then I have been experiencing a number of issues with all of my existing dwg files and any new files I create. The prob is that I am unable to select items (objects/text/lines) before I select the commands. For instance I am unable to select a line and then press delete. I am also unable to select a viewport to lock and unable to select text to edit. I am also unable to copy with basepoint, or copy things in to a new drawing file. However I can delete / move as long as I select the command prior to selecting the item. Has anyone got any solution of how I can resolve this issue? I am experiencing this issue across all of my AutoCAD files, not just one and have an important drawings which was due to be issued to the Client by Monday which I am unable to edit. Thank you in advance for your help.
  8. Hi Guys, New to CAD Tutor. I came here looking for a lisp routine to do multiple copies at varying distances from a point relative to the last copy point. I found Lee Mac's Lisp Routine on an old post but I am having trouble with it. I am using AutoCAD 2018. (defun c:copyrel ( / b i l o p q s ) (if (and (setq s (ssget "_:L")) (setq p (getpoint "\nSpecify Base Point: ")) (setq b (vlax-3D-point (trans p 1 0))) ) (progn (repeat (setq i (sslength s)) (setq l (cons (vlax-ename->vla-object (ssname s (setq i (1- i)))) l)) ) (while (setq q (acet-ss-drag-move s p "\nSpecify Second Point: " 0 0)) (setq s (ssadd)) (foreach x l (vla-move (setq o (vla-copy x)) b (vlax-3D-point (trans q 1 0))) (ssadd (vlax-vla-object->ename o) s) ) (setq p q) ) ) ) (princ) ) (vl-load-com) (princ) So it seems to work up until the second copy. The issue I have is that I am unable to control the direction of the second copy. Also the distance is incorrect for the direction it does copy it to. I am trying to use it to quickly draw a column grid. I have orthomode on. My first copy is horizontal, the second is also to be horizontal and all visual cues show as if it will be copied horizontally, just like the other copy. However, the result is that it copies the object downward. And not even to the correct distance. For example I typed in 20'-8" and it copied it 7' something down on the Y-axis. This is exactly what I am looking for so if anyone can help me out with this it would be fantastic!!
  9. I have difficulty on specifying the distance for copy or move commands. It has different options and I have to get my desired result after many try and error. Where can I find a detailed explanation on these commands options? distance, base point and first point as displacement. My exact problem is as follows: I want to move a line 5 cm to the right of present location with orthogonal active . What is the best/fastest way to do this?
  10. I am so close to getting this code to perform but need some final touches and manipulaton.. Currently it offsets all text on a specific layer and copy's and moves it up "0.15" which is what we already have doing with another layer we use in our drawings. (we use this to add specific descriptions above a labeled point.) What I am looking for now is to change the code so that instead of offseting/copying/moving every string of text on DEFICIENCY layer within the drawing, I would like for it to prompt me which individual string of text I would like to offset - i.e. ("\nSelect Text to Offset: "), THEN after I make that selection it offset/copy/move that string up "0.15" and be put on DEFICIENCY layer with its respective properties... Hoping someone can chime in soon and thank you all for the support!
  11. Hello, I'm very new to LISP and wanted a hand with writing a simple script to copy a line and change the layer to a specific layer. It going from Layer "50" to "TRAV" and I wanted this changed line copied on to of itself. I have a pretty good understanding of TCL as I have written in that when using Surpac but I'm at a new job now and trying to educate myself with a few basic but useful scripts. Any help will be great.
  12. I want to copy/paste some items from one job into another job. I have reverted everything to layer 0 and there is no text at all in the items I am copying. When I bring it into the other drawing, all the text styles have come with it, which I do not want. I have tried to run 'purge' to get rid of them, and it doesn't work. If I try to deleter any of the text styles, it says they are in use (which they are not, since the new drawing has no text in it yet.... I am creating a new template and it is 100% devoid of text so far). What am I doing wrong?
  13. I have a lisp that copies everything inside a circle, but I wish I can copy everything inside a closed polyline. Can you help me editing this code? (defun c:det (/ osm blip ent alist cir1 pt1 raio1 cir2 pt2 raio2 fator ss pt) (setq p1 (getpoint "\nSelecione o raio do círculo de ampliação:")) (command "CIRCLE" p1 pause "") (command "undo" "be") (setq osm (getvar "osmode")) (setq blip (getvar "blipmode")) (setvar "blipmode" 0) (setvar "osmode" 0) (setvar "cmdecho" 1) (while (not cir1) (setq ent (car (entsel "\nSelecione o círuculo a ampliar: "))) (if (and ent (setq alist (entget ent)) (= (cdr (assoc 0 alist)) "CIRCLE") ) (setq cir1 ent pt1 (cdr (assoc 10 alist)) raio1 (cdr (assoc 40 alist)) ) ) ) (command "copy" cir1 "" pt1 pause) (setq cir2 (entlast) alist (entget cir2) pt2 (cdr (assoc 10 alist)) ) (command "scale" cir2 "" pt2 pause) (setvar "cmdecho" 0) (setq alist (entget cir2) raio2 (cdr (assoc 40 alist)) fator (/ raio2 raio1) ) (command "copy" "cp" (foreach pt (pt_circulo pt1 raio1 T) (command pt) "" ) "r" cir1 "" pt1 pt1 ) (setq ss (ssget "p")) (command "move" ss "" pt1 pt2) (command "scale" ss "" pt2 fator) (repeat 2 (command "trim" cir2 "" "f" (foreach pt (pt_circulo pt2 raio2 nil) (command pt) "" ) "" ) ) (setvar "blipmode" blip) (setvar "osmode" osm) (setvar "cmdecho" 1) (command "undo" "e") (princ) ) (defun pt_circulo (centro raio inscrito / ang ndiv delta pt resp) (setq ang 0 ndiv 36 delta (dtor (/ 360 ndiv)) ) (if (not inscrito) (setq raio (* 1.0001 (/ raio (cos (/ delta 2.0))))) ) (repeat (1+ ndiv) (setq ang (+ ang delta)) (setq pt (polar centro ang raio)) (setq resp (append resp (list pt))) ) ) (defun dtor (a) (* pi (/ a 180.00)) ) (princ)
  14. Hi All, I'm looking to see if there is a Lisp out there that as you copy a block in a drawing the first attribute with change in increments of 1 I.e. P1 P2 P3 Thickness " " " " Material " " " " (1) " " " " P1 Would be the attribute that changes every time it gets copied. Thanks Brain
  15. I work with AutoCad Electrical. I've been using an amazing Lisp file by Alan J. Thompson (who is a frequent contributor) call Match Attributes Values and it has been a enormous time saver. However, with AutoCad Electrical, the electrical blocks called "components" have an attribute called Tag1 that gives the component its uniqueness. It is this (and only this) attribute that I DON'T want to change when I copy all attributes between these blocks. I attached the wonderful MAV code. (I hopes that's okay.) Can someone help me in modifying the code that would change all attributes except one labelled "TAG1". (and maybe one or two others possible additional tags--for future.) Thank you for any help. mav.lsp
  16. Hi All, As a newbie to AUTOLisp, I am trying to accomplish the following with a script/function, however I still haven't found much useful information 1. While looping through the files in the directory, check if each drawing has any xrefs attached. 2. If yes, then copy all objects from all attached xrefs to the current drawing, and detach them. If no, skip the the next drawing. (If there are xref objects that cannot be copied to the drawing (such as jpgs), then leave them as they are). 3. Save the drawing with the same file name in another folder. I know this sounds like asking someone else to do the homework for me, but any kind of help is appreciated as a lot of time has been used already googling around without much progress..... Cheers
  17. Just came across this neat little LISP routine. Works perfect for me and my guys because we insulated pipe and this eliminates having to click click click click to constantly offset lines both ways. (defun C:OFF2 (/ pickEnt pickObj offDist) (vl-load-com) (setvar "ErrNo" 0) (while (and (not (setq pickEnt (entsel))) (/= 52 (getvar "ErrNo")))) (cond ((and pickEnt (setq pickObj (vlax-EName->vla-Object (car pickEnt))) (progn (initget 6) (setq offDist (getdist "\nSpecify offset distance: ")))) (vla-Offset pickObj offDist) (vla-Offset pickObj (- offDist)) (I:PutCL pickObj))) (princ)) (defun I:PutCL (myObj / linetypes ltName) (setq linetypes (vla-Get-Linetypes (vla-Get-Document myObj)) ltName "Center") (cond ((vl-catch-all-error-p (vl-catch-all-apply 'vla-Item (list linetypes ltName))) (vla-Load linetypes ltName (cond ((= (getvar "Measurement") 0) "Acad.lin") ("AcadISO.lin"))))) (vla-Put-Linetype myObj ltName)) Question: Can someone have a look and instead of prompting for offset distance (since we already have a standard set distance ALWAYS) of 0.812 so thats what I would need. Also can someone add a for multiple piece? God bless!
  18. Hello all, Could anyone tell me how to alter this code? It asks to pick a value then whether to apply it once or multiple times. In multiple mode, you still only choose one at a time. I would like to be able to apply to multiple objects at once, using a selection box. Thanks -Nobull ;;;;Realization {Smirnoff} ;;; TTCM - Text to Text copy whith Matchprop. Copy text from DIMENSION, TEXT, ;;;MTEXT, ATTRIB, ATTDEF, ACAD_TABLE to one (defun c:tt (/ actDoc vlaObj sObj sText curObj oldForm oType oldMode conFlag errFlag *error* prop) (vl-load-com) (setq actDoc(vla-get-ActiveDocument (vlax-get-acad-object))) (vla-StartUndoMark actDoc) (defun TTC_Paste(pasteStr / nslLst vlaObj hitPt hitRes Row Column) (setq errFlag nil) (if (setq nslLst(nentsel "\nPaste text >")) (progn (cond ( (and (= 4(length nslLst)) (= "DIMENSION"(cdr(assoc 0(entget(car(last nslLst)))))) ); end and (setq vlaObj (vlax-ename->vla-object (cdr(assoc -1(entget(car(last nslLst))))))) (if (vl-catch-all-error-p (vl-catch-all-apply 'vla-put-TextOverride(list vlaObj pasteStr))) (progn (princ "\n Can't paste. Object may be on locked layer. ") (setq errFlag T) ); end progn ); end if ); end condition #1 ( (and (= 4(length nslLst)) (= "ACAD_TABLE"(cdr(assoc 0(entget(car(last nslLst)))))) ); end and (setq vlaObj (vlax-ename->vla-object (cdr(assoc -1(entget(car(last nslLst)))))) hitPt(vlax-3D-Point(trans(cadr nslLst)1 0)) hitRes(vla-HitTest vlaObj hitPt (vlax-3D-Point '(0.0 0.0 1.0)) 'Row 'Column) ); end setq (if(= :vlax-true hitRes) (progn (if (vl-catch-all-error-p (vl-catch-all-apply 'vla-SetText(list vlaObj Row Column pasteStr))) (progn (princ "\n Can't paste. Object may be on locked layer. ") (setq errFlag T) ); end progn ); end if ); end progn ); end if ); end condition # 2 ( (and (= 4(length nslLst)) (= "INSERT"(cdr(assoc 0(entget(car(last nslLst)))))) ); end and (princ "\nCan't paste to block's DText or MText. Select Attribute ") (setq errFlag T) ); end condition #3 ( (and (= 2(length nslLst)) (member(cdr(assoc 0(entget(car nslLst)))) '("TEXT" "MTEXT" "ATTRIB" "ATTDEF")) ); end and (setq vlaObj (vlax-ename->vla-object(car nslLst))) (if (vl-catch-all-error-p (vl-catch-all-apply 'vla-put-TextString(list vlaObj pasteStr))) (progn (princ "\nError. Can't pase text. ") (setq errFlag T) ); end progn ); end if ); end condition #4 (T (princ "\nCan't paste. Invalid object. ") (setq errFlag T) ); end condition #5 ); end cond (if (and (null errFlag) (= (type vlaObj) 'VLA-OBJECT)) (mapcar '(lambda (x y) (vlax-put-property vlaObj x y)) '(Linetype LineWeight Color Layer) prop ) ) T ); end progn nil ); end if ); end of TTC_Paste (defun TTC_MText_Clear(Mtext / Text Str) (setq Text "") (while(/= Mtext "") (cond ((wcmatch (strcase (setq Str (substr Mtext 1 2))) "[url="file://\\"]\\[/url][\\{}`~]") (setq Mtext(substr Mtext 3) Text(strcat Text Str) ); end setq ); end condition #1 ((wcmatch(substr Mtext 1 1) "[{}]") (setq Mtext (substr Mtext 2)) ); end condition #2 ( (and (wcmatch (strcase (substr Mtext 1 2)) "[url="file://\\P"]\\P[/url]") (/=(substr Mtext 3 1) " ") ); end and (setq Mtext (substr Mtext 3) Text (strcat Text " ") ); end setq ); end condition #3 ((wcmatch (strcase (substr Mtext 1 2)) "[url="file://\\"]\\[/url][LOP]") (setq Mtext(substr Mtext 3)) ); end condition #4 ((wcmatch (strcase (substr Mtext 1 2)) "[url="file://\\"]\\[/url][ACFHQTW]") (setq Mtext (substr Mtext (+ 2 (vl-string-search ";" Mtext)))) ); end condition #5 ((wcmatch (strcase (substr Mtext 1 2)) "[url="file://\\S"]\\S[/url]") (setq Str(substr Mtext 3 (- (vl-string-search ";" Mtext) 2)) Text(strcat Text (vl-string-translate "#^\\" " " Str)) Mtext(substr Mtext (+ 4 (strlen Str))) ); end setq (print Str) ); end condition #6 (T (setq Text(strcat Text(substr Mtext 1 1)) Mtext (substr Mtext 2) ) ); end condition #7 ); end cond ); end while Text ); end of TTC_MText_Clear (defun TTC_Copy (/ sObj sText tType actDoc) (if (and (setq sObj(car(nentsel "\nCopy text... "))) (member(setq tType(cdr(assoc 0(entget sObj)))) '("TEXT" "MTEXT" "ATTRIB" "ATTDEF")) ); end and (progn (setq actDoc(vla-get-ActiveDocument (vlax-get-Acad-object)) sText(vla-get-TextString (vlax-ename->vla-object sObj)) ); end setq (if(= tType "MTEXT") (setq sText(TTC_MText_Clear sText)) ); end if ); end progn ); end if (setq prop (mapcar '(lambda (x) (vlax-get-property (vlax-ename->vla-object sObj) x)) '(Linetype LineWeight Color Layer) ) ) sText ); end of TTC_Copy (defun CCT_Str_Echo(paseStr / comStr) (if(< 20(strlen paseStr)) (setq comStr (strcat (substr paseStr 1 17)"...")) (setq comStr paseStr) ); end if (princ (strcat "\nText = \"" comStr "\"")) (princ) ); end of CCT_Str_Echo (defun *error*(msg) (vla-EndUndoMark (vla-get-ActiveDocument (vlax-get-acad-object))) (princ "\nQuit TTCM") (princ) ); end of *error* (if(not ttc:Mode)(setq ttc:Mode "Multiple")) (initget "Multiple Pair-wise") (setq oldMode ttc:Mode ttc:Mode (getkword (strcat "\nSpecify mode [Multiple/Pair-wise] <" ttc:Mode ">: ")) conFlag T paseStr "" ); end setq (if(null ttc:Mode)(setq ttc:Mode oldMode)) (if(= ttc:Mode "Multiple") (progn (if(and(setq paseStr(TTC_Copy))conFlag) (progn (CCT_Str_Echo paseStr) (while(setq conFlag(TTC_Paste paseStr))T ); end while ); end progn ); end if ); end progn (progn (while (and conFlag paseStr) (setq paseStr(TTC_Copy)) (if(and paseStr conFlag) (progn (CCT_Str_Echo paseStr) (setq errFlag T) (while errFlag (setq conFlag(TTC_Paste paseStr)) );end while ); end progn ); end if ); end while ); end progn ); end if (vla-EndUndoMark actDoc) (princ "\nQuit TTCM") (princ) ); end c:ttc (princ "\n\t TTCM - Text to Text copy with matchprop.") (princ "\nCopy text from DIMENSION, TEXT, MTEXT, ATTRIB, ATTDEF, ACAD_TABLE to one")
  19. When copying a large amount of obects (i.e. moving a set of points obtained from a DXF file for a Feature & Level), the crosshair disappears and the screen appears frozen until I click again. The only problem is when I click, the objects I copy past in a place where I don't necessarily want them to (The place is determined by where my crosshair is, which is hidden on my screen). Is there a fix for this? I can right click to bring up *invalid move* which then lets me see my crosshair, but this gets annoying. ~ Using AutoCAD 2014. This also happens on Civil 3D 2010, which I use for contouring.
  20. Hi, I'm looking for a way to copy only circles (but several of them) from the model space to paper space. I found a utility that does it but there are few limitation that need to be resolved. Can the viewport scale be counted as a part of the routine so that the object seen from the layout space is exactly copied as is (should not come 1:1 if the viewport scale is 1:2) and at the exact same location. I want to copy only circles of the balloon which is actually an attribute block so something like ncopy (which actually extracts only selected entity out of the whole block). This will actually make 2 overlapping entities but one on the paper space and the other one on the model space. Now, all this I want to do it from the paper space (without having to go to model space) so that I can pick which entities that I want to copy from layout mode as if I have double clicked inside a viewport which jumps into model space and comes back to PS after the selection is done. (Defun c:Ms2Ps () (setq CRT (getvar "Tilemode")) (setvar "Tilemode" 1) ; Change to modelspace (prompt "\nSelect objects to copy to model space: ") (setq SS1 (ssget)) (command "_.copybase" "0,0" SS1 "") (setvar "Tilemode" 0) ;Change to paperspace (command "_.Pasteclip" "0,0") (setvar "tilemode" CRT); ); Appriciate any help on this. Let me know if I'm not explaining well enough.
  21. Is there any possible way to do that? I had a .dwg with a layer with contours and i deleted it (my fault) .. I have this layer in another .dwg . Is there any way to transfer it in the other drawing file? Thanks in advance!
  22. Nobull84


    In the never-ending search for lisps, functions and commands to make life easier, efficient and productive, I have a suggestion. Your website has an amazing amount of information. For lisps in particular, and maybe other areas, have categories for users to put their information into. If someone was searching for a particular copy command, they could choose that category and browse the available. It seems the search function brings about many other things not pertaining to the keyword. Thanks for the help and keep up the good work, Nobull84
  23. we switched from civil 3d 2012 to 2014 and since we switched my copyclip (ctrlv or right click ) will work for the first few times then after that it will say "duplicate definition of block XX ignored Substituting [simplex.shx] for [TB.shx]. Substituting [simplex.shx] for [GB-LD.SHX]. Substituting [simplex.shx] for [TC-ROMND.SHX]. this happens when pasting the same item in that ive already pasted in 2-3 layouts and once this starts happening i cant copy paste at all untill i shutdown autocad and reset my computer (which only works like 30% of the time) also this would happen regardless of what the object is i could draw a line and not be able to copy paste it. and another thing it does when this starts happening is it creates a few dozen random blocks *A2556 etc etc that i have to purge out. please help me with this issue ive managed to figure out/deal with all the other issues autocad 2014 has brought to us but this one i cant figure out for the life of me and its not just my computer it happens on all of them and happens even if you start a project with nothing
  24. torimiles

    Copy and Pasting

    Hi, I have a project for school that I am trying to complete at home, but realized that I don't have the proper SUD file at home. Is there any way I could copy and paste the already dimensioned object into the new SUD later? Please help a.s.a.p. Thank you so much, Tori
  25. Hello everyone, I just made a 3D model with ACAD 2011. fixed_pedestal.dwg It has chamfers and fillets. When i copy the 3D model, the copy doesn't have any chamfers or fillets . Anyone knows why? greetings, SB
  • Create New...