Jump to content

Search the Community

Showing results for tags 'rename'.



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 7 results

  1. ILoveMadoka

    Layout Rename - Fail

    I tried to modify this routine (to rename all Layout Tabs) (vl-load-com) (defun RenLay ( kword / n) (setq n 1) (vlax-for x (vla-get-Layouts (vla-get-ActiveDocument (vlax-get-acad-object))) (if (not (eq (strcase (vla-get-name x)) "MODEL")) (vla-put-Name x (strcat kword (itoa n))) ) (setq n (1+ n)) ) ) Which was found here: http://forums.augi.com/showthread.php?77060-Rename-Layout-tabs-on-multiple-dwg&highlight=rename layout To allow me to enter the desired name as part of the routine but I obviously don't know jack.. (vl-load-com) (defun C:RT5 (S1 / n) (setq S1 (getstring T "\nEnter New Layout Prefix:")) (setq n 1) (vlax-for x (vla-get-Layouts (vla-get-ActiveDocument (vlax-get-acad-object))) (if (not (eq (strcase (vla-get-name x)) "MODEL")) (vla-put-Name x (strcat S1 (itoa n))) ) (setq n (1+ n)) ) ) When I run the routine I just get *Cancel* I want to change the number(s) to start with a zero (01) but I'll "attempt" that next... If someone could explain "WHY" this doesn't work, I'd appreciate it..
  2. Hi, Why sometimes this operation returns wrong: (defun c:cvt() (setq oldname "ESP - Esquadrias CIR")(setq newname "ANT - Esquadria Círculo")(runtorenamelayer) ) (defun runtorenamelayer() (if (and(tblsearch "layer" oldname)(not(tblsearch "layer" newname))) (COMMAND "._-RENAME" "LA" OLDNAME NEWNAME);;(command "._-layer" "R" oldname newname "") ) (if (and(tblsearch "layer" oldname)(tblsearch "layer" newname)) (progn (command "Laymrg") (foreach e (list oldname) (if (tblsearch "LAYER" e)(command "_Name" e)))(command "" "_N" newname "_Y") ;;(command "_.-PURGE" "_La" oldname "_N") ) ) (princ) ) Being specific, if I load the code with the appload or even in the ACAD.LSP the problem occurs. And the result is a strange name: ANT - Esquadria Círculo If I just copy and paste the code into the command bar it works fine and te name is ok: ANT - Esquadria Círculo Ok, I am thinking about avoiding special characters in the new Layer names, but in some cases the old layers have them already, and in this situation the operation doesn't rename that old layers, the application just skip them because the names doesn't match. TIA
  3. First off KUDOS to Tharwat for this brilliant LISP. Can someone edit so its doesnt prompt user for Suffix.. I want the suffix to be -NEW all the time. Also for the block selection I would just like for the lisp to select all everytime. Will be running this on a folder of specific individual blocks. I did in fact try, I just havent succeeded yet thanks. (defun c:RenBlks (/ Blocks *error* cm r ss int sn sfx kw bks nam) (vl-load-com) ;;; Tharwat 31. Oct. 2012 ;;; ;;; Rename selected or All Blocks as User's inputs ;;; (or acdoc (setq acdoc (vla-get-activedocument (vlax-get-acad-object)))) (setq Blocks (vla-get-blocks acdoc)) (setq cm (getvar 'cmdecho)) (defun *error* (x) (if cm (setvar 'cmdecho cm) ) (vla-EndUndoMark acdoc) (princ "\n") (princ "\n *Cancel*:") ) (if (and (not (eq (setq sfx (getstring t "\n Specify Suffix :")) "")) (setq r (snvalid sfx)) (progn (initget "Selected All") (setq kw (cond ((getkword "\n Rename [selected . All] Blocks < Selected > :")) ("Selected") ) ) ) ) (if (eq kw "All") (progn (vla-StartUndoMark acdoc) (vlax-for x Blocks (vl-catch-all-apply 'vla-put-name (list x (strcat (vla-get-name x) sfx)))) (vla-EndUndoMark acdoc) ) (if (setq ss (ssget "_:L" '((0 . "INSERT")))) (progn (vla-StartUndoMark acdoc) (setvar 'cmdecho 0) (repeat (setq int (sslength ss)) (setq sn (ssname ss (setq int (1- int)))) (setq nam (cdr (assoc 2 (entget sn)))) (if (not (member nam bks)) (progn (vl-cmdf "_.-rename" "B" nam (setq nam (strcat nam sfx))) (setq bks (cons nam bks))) ) ) (vla-EndUndoMark acdoc) (setvar 'cmdecho cm) ) ) ) (cond ((not sfx) (princ "\n Cancelled by user ")) ((not r) (princ "\n Not Valid Block name ")) (t (princ "\n Cancelled by user ")) ) ) (princ "\n Written by Tharwat Al Shoufi") (princ) )
  4. I have just taken over a project using SolidWorks 2013 Workgroup PDM. I found out that almost every file will be soon renamed/renumbered. I have looked online (and youtube) with no success. Is is similar to the regular Solidworks rename? Do you rename them while they are still in the vault? Anyone have any experience in Workgroup PDM (NOT EPDM!) Any help, links, advice, input is greatly appreciated!! Thanks!
  5. I have an autocad drawing with so many light fixtures with all different names.Now we have to change all those names, i already have an excel sheet containing two columns with first one containing "name in drawing" and second one containing respective "new name". Is there any way to replace the names in cad file using that excel sheet.i just dont want to do all those thousand rename manually ...please some cad-guru help me
  6. Hi all, Is it possible to rename layouts from a spread sheet or table within a drawing? I have loads of drawings which require the layouts renaming i to a protocol and renaming individually takes ages while the layout regenerates. Your help would be most appreciated Stenna
  7. Hello Everyone! As my first post I'm going to give a doozy. I've searched and searched, but can't find a lisp or info that helps me with my problem. Maybe I can find some help here - even though I've already turned grey, I'd still appreciate it. So, here we go... I insert attributed blocks into my drawings that list part number, model number, etc. Along with these attributes, there's another tag that is an incremental number (used in our Bill of Materials). If there are two identical parts (i.e., same model number), the incremental number needs to be the same; if the parts are different, the next sequential number needs to be used. Doing this by hand is not only time-consuming, but tends to be extraordinarily erroneous. So I'm looking to make a lisp routine that I can run to auto-number these blocks. I'm thinking that I can insert my blocks (or re-use them, copy, etc.) without too much concern over the number tag, then run the lisp at the end to give the numbers to each unique block. It'd be nice if any numbers already there could stay the same (we re-use drawings all the time). Block: BOMTAG Tags: ITEM (Increment Number) MODEL (Model Number) PART (Part Number) I don't know a ton of lisp, so I don't know that I can make it on my own, but maybe a nudge in the right direction could keep me from wasting a bunch of time. Any ideas? Make a list of blocks, do something with them, give if-then statements, re-number if needed, move to next block. Easy to type, hard to program. Free rendering to anyone who gets the winning code. Thanks so much, I appreciate any help. -stu
×
×
  • Create New...