Nested DCL Dialog box

#1
I'm trying to add a nested dialog box to my piping routine using this as a guide:
https://www.afralisp.net/archive/lispa/lisp43a.htm.

As a starting point I've added a new button 'NEXT' to the main dialog, bottom right.
However I am getting an error message when I select 'next' and I am struggling to locate the source!
Image
.
While the error message is pointing to line 48, I can't see the actual error in the code.

I will have to try and add the code in another post as I keep getting an error 403 when I add the code!!!!!!!


SteveN

Re: Nested DCL Dialog box

#6
Hi Quan,
Yes I got that to work as a standalone, but I'm struggling to integrate it into my pipping lsp.

I have got the nested dialog to appear from the 'next' button (found the typo from my OP) and now trying to get it to be called from one of the existing radio buttons (Long Radius Elbows 90).
Once displayed the user will have additional radio button options to select from before returning to the original dialog.

Like This:
Image
[For Info: Within the piping world there are a number of variations for elbows, Long Radius, 3D Radius & 5D radius.]

SteveN

Re: Nested DCL Dialog box

#7
What I am trying to achieve is when radio button 'rb1' is selected, it call the nested dialog.

This is the code for the 'next' button: (which works)
(action_tile "next" "(nest1)")

I tried this, but didn't work
(action_tile "rb1" "(nest1)(SET_WLRE90_IMAGE)" ); END ACTION TILE.

followed by:
(action_tile "rb1" "(next)(SET_WLRE90_IMAGE)" ) ; END ACTION TILE.

Here is the lisp code

Code: Select all

(defun nest1 () 
  (setq dcl_id1 (load_dialog "sln_piping.dcl"))	  		;the DCL file where the dialog is located
  (if (not (new_dialog "nest1" dcl_id1))
      (exit)   								 ;if not loaded exit
  ); end of if

  (action_tile "cancel" "(done_dialog)(setq result1 nil)")  ;if cancel selected do this
  (action_tile "accept" "(done_dialog)(setq result1 T)")    ;if OK selected do this
  (start_dialog)   							;start the nested dialogue box
  (unload_dialog dcl_id1) 					;unload the nested dialogue box

  (princ)
); End of defun

  
.SteveN

Re: Nested DCL Dialog box

#8
Hi Steve,
I use your SLN_PIPING lisp then try to replace your line

Code: Select all

  (action_tile "s1"				 						;toggle Fitting options
		"(L1_ON)(L2_OFF)(L3_OFF)(L4_OFF)(L5_OFF)
		(L1_CLEAR)(L2_CLEAR)(L3_CLEAR)(L4_CLEAR)(L5_CLEAR)
		(RESET_LABELS)(RESET_DIMS)(RESET_LIST)"										 
	); END ACTION TILE
by this line

Code: Select all

(action_tile "s1" "(nest1)" )

it works as below image.
Attachments
Nest_DCL.png
Nest_DCL.png (31.8 KiB) Viewed 3502 times

Re: Nested DCL Dialog box

#10
Well I’ve made good progress and have managed to get the nested box to pass the radii selection through to the main dialog/app.
I did find on the way that I needed to rename some of the functions & variables in the main app to enable me to differentiate between elbow radii.
So I can now create an elbow fitting from start to finish, well for one type, the original LRE.
Image
.
Image
.

Unfortunately none of the other 3 options work!!
It works to here:
Image
.
Image
.
So the code is recognising I have selected Short Radius Elbows from the nested box.
(top right in the ‘sizes’ window)

However when I select ‘OK’ I get the following at the command prompt:
C:SLN_PIPING
Current status for ftg is: = sre90_
Filename after unload_dialog = sre90_sch_10_.DIM
Current VERSION for the lisp file is: = 2.2.0-ICAD10
Not found drawing name <SRElbow_90_SCH_10_20-3D.dwg> in support file search path
.

Now in part this is correct as there is no SRELBOW_90_SCH_10_20-3D.DWG in the search path.

But the code:

Code: Select all

   (if (tblsearch "block" F:NAME)(INS_FTG)
	(ELB90_SSP)
	); end IF
Says if the file is not found do >(ELB90_SSP)< and it is not doing this.

more issues with 403 forbidden so not the full code below!!!!
Full Code:
see attached zip.
SteveN
Attachments
sln_piping_2-2-0.zip
(32.66 KiB) Downloaded 151 times
cron