Jump to content

Search the Community

Showing results for tags 'pop window'.

  • 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, I have a lisp code that I have been working on and I have brought it to a certain stage. However, I am having a problem at one point. In this lisp code, I have a product list with my purpose defined. When the code runs, my product list is listed in the pop-up window. And I choose what I want and paste it to the places I specify on the screen. However, my product list can be up to 500 items, so I created a search button in the popup window. The button works, but it is based on the line number I choose, not the product name I choose, and it writes the product on this line number in the general list to the screen. I need support on how to overcome this problem. main command (defun C:prdef (/ dcl_id product_list product filter_list pt index) (create-layer "00-Equipment List" 3) ; Number 3 is used for green color (setq product_list '("Product-1" "Product-2" "Product-3" "Product-4" "Product-5" "Product-6" "Product-7" "Product-8" "Product-9" "Product-10" "Product-11" "Product-12" "Product-13" "Product-14")) (setq dcl_id (load_dialog "product_select.dcl")) (if (not (new_dialog "product_select" dcl_id)) (exit) ) (start_list "product_list") (mapcar 'add_list product_list) (end_list) (action_tile "search_box" "(progn (setq filter_text $value) (update_list filter_text))") (action_tile "product_list" "(setq product (nth (atoi $value) product_list))") ; (action_tile "ok" "(done_dialog)") (action_tile "search_button" "(update_list filter_text)") ; (start_dialog) (unload_dialog dcl_id) (initget 1) (while (setq pt (getpoint "\nChoose a location (exit with ESC): ")) (setq index (atoi product)) ; (command "_.-layer" "_S" "00-Equipment List" "") ; (command "_.text" pt default-text-height 0 product) ; (command "_.-layer" "_S" "0" "") ; ) ) ; List update function (defun update_list (filter_text / filtered_list) (setq filtered_list (if (= filter_text "") product_list (vl-remove-if-not '(lambda (x) (vl-string-search (strcase filter_text) (strcase x))) product_list ) ) ) (start_list "product_list") (mapcar 'add_list filtered_list) (end_list) (set_tile "product_list" "") ) In my dcl code as follows product_select : dialog { label = "Product Select"; : edit_box { key = "search_box"; label = "search"; width = 40; } : button { key = "search_button"; label = "search"; is_default = true; } : list_box { key = "product_list"; multiple_select = false; fixed_width = true; width = 40; } ok_cancel; }
×
×
  • Create New...