Jump to content

Search the Community

Showing results for tags 'subroutine'.

More search options

  • 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

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...

Found 1 result

  1. I wanted to create a new thread since it's a different problem even though it is from a previous thread. Since I never know how many instances of a font that needs changing (SLDTEXTSTYLE) I wanted to create a counter. http://www.cadtutor.net/forum/showthread.php?91375http:// Digging around I found a way to create my counter number from this thread: http://www.cadtutor.net/forum/archive/index.php/t-76290.html How do I make the CNT a subroutine and call it from C:SWT (defun c:cnt () (setq la (cdr (assoc 2 (tblnext "STYLE" T)))) (setq lal (list la)) (while (/= (setq la (cdr (assoc 2 (tblnext "STYLE")))) nil) (setq lal (append lal (list la)) ) ) (setq LEN (length lal)) ) (defun c:swt (/ i s) (Princ "\nFinds all SW Text Styles, replaces with ROMANS Font:") (if (not (tblsearch "STYLE" "ROMANS")) (progn (command "_.STYLE" "ROMANS" "ROMANS") (while (> (getvar "CMDACTIVE") 0) (command "")))) (setq i 0) (repeat 9 ; All my LEN from the subroutine here? (setq s (strcat "SLDTEXTSTYLE" (itoa i))) (if (tblsearch "STYLE" s) (progn (command "_.STYLE" s "ROMANS") (while (> (getvar "CMDACTIVE") 0) (command "")))) (setq i (1+ i))) (princ)) And of course if there is a "better way" I'm always open to that too!! Thanks Much!
  • Create New...