I want to create a filter dialog box same as AutoCAD filter command

I need help to create .dcl file How to generate can any one help me.

Comments

  • I don't know if the attached files are of any use to you.

    You will need to alter the filter.txt file to filter.dcl as the forum doesn't recognise .dcl files.

  • aridzv
    edited December 2024

    @David Waight

    Nice lisp!!

    There is a small problem though.

    after the selection the filter is applied but when pressing "ENTER" or right-cilcking with the mouse the selected objects are cleared (see attched video).

    I tried to strock out the "IF" Statment in line 2636:

    (if (and (/= 0 (getvar "cmdactive"))
    (= 1 what_next)
    )
    ret_list
    (princ)
    )

    but it didn't worked.

    is there a way to make the lisp keep the selection?

    Thanks,

    Aridzv.

  • @aridzv,

    Apologies, I didn't test it as it isn't my lisp :-(

    Attached is another by Rakesh Rao, which is similar, but doesn't allow you to save your filters.

    I did a quick test and the selection stays highlighted.

    The same applies to renaming the .txt file.

    I know precious little about lisp, so if you need anything changing you will need to get help from one of the experts on here

  • aridzv
    edited December 2024

    Hi @David Waight and thanks for the reply.

    when loading the lisp I get this Error:

    "Error: Cannot find 'HGSORT.LSP' file that is required for FILTER command to work" (See attached screenshot).

    do you have this LSP file?

    thanks,

    Aridzv.

    *EDIT:

    Found the LISP in this post.

    see attached file as well.