Jump to content

DCL multiple text boxes in line and file selection?


TemporaryCAD

Recommended Posts

How would I go about making something like this:

 

 sampledcl.png.3cda40c2c21eb2cbde9db44385641d76.png

 

Additionally, would it be possible to embed the (getfiled) window into a DCL window, so I can have file selection at the same time as data entry?

 

This is my first time using DCL, and I haven't had much luck finding resources relating to these questions.  Thanks!

Link to comment
Share on other sites

A good resource for making DCL

https://autolisp-exchange.com/Tutorials/MyDialogs.htm

 

(setq total (rtos (length (setq lst (layoutlist)))2 0)) ;total number of layouts
(setq pos (rtos (+ (vl-position (getvar 'ctab) lst) 1)2 0)) ;find the postion in the list
(prompt (strcat "\n" pos " of " total)); output "1 of 3"

 

 

--edit

See what rlx did here

 

 

Edited by mhupp
Link to comment
Share on other sites

I found a hacky workaround - Here's an image:

sheetno.PNG.29ee68394483508111a33eeae2f69d5f.PNG

 

And here's the dcl for the row:

: row {
      
      : edit_box{
      label = "Enter Sheet Number:                                                           ";
      mnemonic = "S";
      key = "number";
      alignment = right;
      edit_limit = 2;
      edit_width = 2;
      }
      
      : edit_box{
      label = "of";
      key = "number2";
      alignment = left;
      edit_limit = 2;
      edit_width = 2;
      }
    }

 

It turns out adding a bunch of spaces will mess with the spacing.  I hope this helps someone else!  

Edited by TemporaryCAD
  • Like 1
Link to comment
Share on other sites

Maybe this as an alternative can be made into more input  lines.

image.png.31a990142aed2ce821200a369263d386.png

 

Multi GETVALS.lsp

 

(if (not AH:getvalsm)(load "Multi Getvals.lsp"))
(setq ans (AH:getvalsm (list "Enter sheet values " "Sheet number  " 5 4 "1" "Of " 5 4 "x")))

 

Edited by BIGAL
  • Like 1
Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...