Jump to content

Search the Community

Showing results for tags 'bad argument'.

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


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

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...

Found 1 result

  1. Greetings all! I recently wrote a routine that took information from the user via a dialog box and populated our titlemark block. After I got this working I wanted to add some additional functionality by having the user pick the viewport the titlemark would be associated with and by using a field populate the scale in the titlemark instead of having the user type in the input. I have attached my desired result. here is the code I am using, I think my problem area is in red. (defun C:TLMK ( / TLMK_LEN PT1) (setvar "CMDECHO" 0) (setq tempunits (getvar "insunits")) ;======================================================================================================================================== LOADS DIALOG BOX (defun TLMK(/ DCL_ID) (setq DCL_ID (load_dialog "n:/tuterj/AutoLISP/Working/TL-MK_Scale_add.DCL")) (if (not (new_dialog "TLMK" DCL_ID)) (exit)) (setq mark_n nil) (setq title_n nil) (action_tile "cancel" "(done_dialog) (exit)") (action_tile "mark_n" "(setq mark_n $value)") (action_tile "title_n" "(setq title_n $value)") (start_dialog) (unload_dialog DCL_ID) (princ) ) ;defun TLMK (TLMK) ;======================================================================================================================================== End of Dialog BOx [color=red](vl-load-com)[/color] [color=red](setq vpent (car (nentsel "\nselect viewport"))) ;user selects viewport and viewport id is stored under vpent[/color] [color=red](vlax-ename->vla-object vpent) ;vpent is transformed from an entity to a VLA object[/color] [color=red](setq scale_fld (strcat "%<\AcObjProp.16.2 Object(%<\_ObjId "(vl-princ-to-string(vla-get-Objectid vpent))">%).CustomScale \f\"%sn\">%")) ;assigns field expression to variable.[/color] (setq PT1 (getpoint "\nselect insertion point: ")) (setvar "ATTDIA" 0) (setq title_u (strcase title_n)) ;declaring additional variable to change case for title_n (setvar "insunits" 0) ;setting insertion units to unitless for proper scale of inserted block (command "insert" "N:/Tuterj/AutoLISP/Working/TitleMark-field.dwg" PT1 "" "" title_u scale_fld mark_n) ;inserting the contents of TitleMark drawing and inserting user input from dialog box. (setvar "ATTDIA" 1) (setvar "CMDECHO" 1) (setvar "insunits" tempunits) ) ;defun C:TLMK I have also attached the error I am getting when I try to run the routine. I would appriciate any help anyone is willing to provide. Thank you all for your time and for reading.
  • Create New...