TemporaryCAD Posted August 25, 2022 Posted August 25, 2022 (edited) I am building a program to wrap a bunch of useful functions. I was the user to select from an arbitrarily long list, and sort this selection into one of a set amount of "baskets". Each basket contains the relevant autolisp program and DCL UI for the selected item to execute. For example, pretend I was talking about screws. I could select a screw, then it will open the relevant window for the type of threading and let me input the specific variables. I want a generic open window function to open the specified DCL window. This function would, ideally, read the DCL for the open window and assign actions to each tile automatically. The example here is a toggle function, that enables/disables a window selection. If I could read the keys from the DCL into the AutoLISP, I could automatically add all tiles to this function and have them start disabled: (defun toggle(state) (if (eq state "1") (progn (mode_tile "length2" 0) (mode_tile "incline2" 0) ) (progn (mode_tile "length2" 1) (mode_tile "incline2" 1) ) ) ) Instead of manually adding each (mode_tile), I would like to have this be done automatically (likely through a mapcar lambda of a list of keys). Is there a way to get that list? Off the top of my head, you could read the DCL file as a txt file and search it manually, but that seems excessive. Thank you! Edited August 25, 2022 by TemporaryCAD Quote
BIGAL Posted August 26, 2022 Posted August 26, 2022 (edited) Ok pick screw, then type, then dia, then length. Inside DCL you can have a child dcl so it pops up over the original dcl so as I hinted 4 sub dcl's inside main DCL. Just check help DCL CHILD. Height is selected and a child dcl pops. Did you google I know this has been answered before using lists. Edited August 26, 2022 by BIGAL Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.