Jump to content

Search the Community

Showing results for tags 'letter'.

  • 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. I made a couple routines for a friend who wanted to increment numbers and letters. I know there are a few different programs out there already but you only learn by trying, right! I used kind of a different approach than the programs I have seen. I tried to understand Lees suite but promptly gave up on that adventure... for now... Please take a look as I would like to know if I did anything that could be improved. All your input lately has been much appreciated, thank you all! The numbering program creates a new text style and gives the user an option to add a suffix to the number with a default option. Is the key the only way i can exit this to be able to reset my variables? (defun c:incnum(/ *error oldcmd oldtextstyle num tht inc lr bp) (setq oldcmd (getvar 'cmdecho) oldtextstyle (getvar 'textstyle) ) (defun *error* (msg) (if oldcmd (setvar 'cmdecho oldcmd)) (if oldtextstyle (setvar 'textstyle oldtextstyle)) (setq msg "Function Completed") (princ msg) (princ) ) (setvar 'cmdecho 0) (command "-style" "ROMANS" "romans.shx" "" "" "" "" "" "") (initget 7) (setq num (getint "\nEnter number to start:")) (initget 7) (setq tht (getreal "\nEnter text height desired:")) (initget 7) (setq inc (getint "\nEnter number to increment by:")) (initget "Left Right") (setq LR (getkword "\nChoose kerf [Left/Right] <Right>: ")) (if(not LR)(setq LR "Right")) (initget 1) (while (setq bp (getpoint "\nPick point--Press <Esc> when finished")) (entmake (list (cons 0 "text") (cons 1 (if (= LR "Right") (strcat(itoa num)",r") (itoa num) ) ) (cons 10 bp) (cons 11 bp) (cons 40 tht) (cons 7 "romans") ) ) (setq num (+ inc num)) (initget 1) ) ) The letter program is set up to always display capital letters regardless of the case of the input.. Also it will quit after letter "Z". (defun c:inclet(/ *error oldcmd start nascii tht bp) (setq oldcmd (getvar 'cmdecho)) (defun *error* (msg) (if oldcmd (setvar 'cmdecho oldcmd)) (setq msg "Function Completed") (princ msg) (princ) ) (setvar 'cmdecho 0) (initget "a b c d e f g h i j k l m n o p q r s t u z w x y z") (setq start (getkword "\Enter starting letter: ")) (if(> (setq nascii (ascii start)) 90) (setq nascii (- nascii 32))) (setq tht (getvar "TEXTSIZE")) (initget 1) (while(<= nascii 90) (setq bp (getpoint "\nPick point--Press <Esc> when finished")) (entmake (list (cons 0 "text") (cons 1 (chr nascii)) (cons 10 bp) (cons 11 bp) (cons 40 tht) ) ) (setq nascii (+ 1 nascii)) (initget 1) ) )
×
×
  • Create New...