Jump to content

Search the Community

Showing results for tags 'file rename'.

  • 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

Categories

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

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Found 1 result

  1. Hello, guys! I need a lisp to rename the current open file. I already have a routine that takes the current file name and creates a string with the new file name (Just six numbers in the old name needs to change)... But I coudn't change the old name for the new name. I've tried to use the (Vl-File-Rename), but I think that i didn't use it right.... Here's go the code: (defun C:changename (n1 n2 n3 n4 n5 n6) (setq new_number (strcat (itoa n1) (itoa n2) (itoa n3) (itoa n4) (itoa n5) (itoa n6))) (setq old_name (strcat (getvar "DWGPREFIX") (getvar "DWGNAME"))) (setq size (strlen old_name)) (setq final (- size 18 )) ; (setq start_name (substr old_name 1 final )) (setq end_name (substr old_name (+ final 7) (- size final))) (setq new_name (strcat start_name new_number end_name)) (alert old_name) (alert new_name) (vl-file-rename old_name new_name) ); end defun The old name is: D:\Profiles\s-Andre.Almeida\Desktop\Autocad\3-157941-012-005.dwg The new name, for example, could be: D:\Profiles\s-Andre.Almeida\Desktop\Autocad\3-666666-012-005.dwg I just need to change the names with the (vl-file-rename) could someone help me?
×
×
  • Create New...