Jump to content

Search the Community

Showing results for tags 'copy'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • 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

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Found 29 results

  1. 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.
  2. 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!!
  3. 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
  4. 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?
  5. 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!
  6. 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.
  7. 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?
  8. 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)
  9. 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
  10. 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
  11. 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
  12. 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
  13. 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!
  14. 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")
  15. 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.
  16. 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.
  17. 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!
  18. Nobull84

    Categories

    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
  19. 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
  20. 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
  21. 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
  22. I have a .lsp file that mostly creates keyboard shortcuts for basic commands. My copy mode is set to default to "multiple" - and if I type "copy", it is indeed multiple. However, if I use my shortcut (just the "c" key), it is not. Here's the code: (defun c:c() (command "copy")) I don't think it gets much simpler than that... why would it not operate the same way as "copy"? Confused.
  23. Hi, i was wondering if someone had a lisp that would copy object by windowing and then change to a different layer but be over the top of the original objects. i need to copy a set of lines inplace and change to a different layer. thanks, Brian
  24. Hi, I'm a new poster currently trying to speed up the production of my pre-cast floor drawings. What I want to do is to select a dynamic block (already inserted into the drawing) and press a button to insert a copy of it, a set distance away from the original. I then want the newly created block to be selected, so that I can press the button again, or press another button (set to another distance) to produce another copy; and so on. I am struggling to get the new block to be selected at the end of the macro. I have tried using single selection, and Last; but the block does not stay selected. Can anybody out there help please? My current script is : ^C^Ccopy;D;@0,521 Thanks
  25. Using Autocad_2k10 and ScriptPro Trying to write a srcipt to copy/paste a certain amount of text in these coordinates (ie.: 1.8520, 13.1085, 0.0000) in 100+ drawings to a file (ie.: 123.txt or 123.xls) I'm stuck on the "paste to file", is this possible? Please advise, I'm using ScriptPro cause of the batch process. Thanks, BW Deen
×