Remember previous DCL values(Default Values)

Remember previous DCL values(Default Values)

desmund08
Contributor Contributor
3,968 Views
23 Replies
Message 1 of 24

Remember previous DCL values(Default Values)

desmund08
Contributor
Contributor

Hi All,

 

Hope you could help me with this one.

 

I have a lisp with dcl that is working already but I want my previous values to be the default value when I run the program again.

 

PLease find attached lisp and dcl files.

 

Thank you in advance.

 

Regards,

 

Desmund

 

0 Likes
Accepted solutions (2)
3,969 Views
23 Replies
Replies (23)
Message 2 of 24

rkmcswain
Mentor
Mentor

There are many ways to do this. One way.....

 

  • Set some default values first.
  • Then retrieve your saved values (from registry, file, memory)
  • If there are no values to retrieve (first time run), then use the defaults you set up.
  • If you do retrieve saved values, test them before using to make sure they are value. You don't want an integer in place of a string, or a real in place of a boolean, etc.
  • When the user is done with the routine, just before exiting, write the new values out to whatever location you are using (registry, file, memory).

See also: Retain values in Edit box DCL

R.K. McSwain     | CADpanacea | on twitter
Message 3 of 24

desmund08
Contributor
Contributor

Hi @rkmcswain ,

Thanks for your reply. 
I tried saving them in USERS but the variable is rejected everytime I exit the program and returns as nil. 
Can you please help me with the above attached lsp and dcl file?

 

Hope anyone could help me with this one. 

Thanks in advance

0 Likes
Message 4 of 24

hak_vz
Advisor
Advisor

@desmund08 Here is my code that uses a file to store DCL tile values.

 

(setq _dialog_state_paths
	(mapcar '(lambda (x)(strcat (getvar 'tempprefix) x)) 
		(list
			"dialog_1.txt"
			"dialog_2.txt"
		)
	)
)

(defun create_temporary_files ( / f)
	(foreach file _dialog_state_paths
		(cond
			((not (findfile file))
				(setq f (open file "w"))
				(close f)
				(setq f nil)
			)
		)
	)
)

(defun string_to_list ( str del / pos )
	(if (setq pos (vl-string-search del str))
		(cons (substr str 1 pos) (string_to_list (substr str (+ pos 1 (strlen del))) del))
		(list str)
	)
)    
(defun dialog_out(filename keylist / file1 val)
	(setq file1 (open filename "w"))
		(foreach key keylist
			(setq val (get_tile key))
			(if val
				(progn
					(write-line (strcat key " " val) file1)
				)
			)
		)
	(close file1)
	(princ)
)
(defun dialog_in (filename / f lin)
	(setq f (open filename "r"))
		(while (setq lin (read-line f))
			(setq lin (string_to_list lin " "))
			(set_tile (car lin) (cadr lin))
		)
	(close f)
	(princ)
)
(defun file_to_list (filename / f lin ret)
	(setq f (open filename "r"))
		(while (setq lin (read-line f))
			(setq lin (string_to_list lin " "))
			(setq ret (cons (cons (car lin) (cadr lin)) ret))
		)
	(close f)
	(reverse ret)
)
 (defun list_to_file (lst filename / f)
	(setq f (open filename "w"))
		(foreach el lst
			(write-line (strcat (car el) " " (cdr el)) f)
		)
	(close f)
)
(defun replace_list_element (lst key val / old_item new_item)
	(setq
		old_item (assoc key lst)
		new_item (cons key val)
		lst (subst new_item old_item  lst)
	)
)


;usage
(setq dcl_tiles '("tile_1" "tile_2" "tile_3" "tile_4") ; this are names of dcl tiles

(dialog_out (nth 0 _dialog_state_paths) dcl_tiles)
(dialog_in (nth 0 _dialog_state_paths) dcl_tiles)

 

Output files are created in system temporary directory. 

In variable _dialog_state_paths place names of output files and run function create_temporary_files to create them

 

(create_temporary_files)

 

For any function handles DCL dialogs use functions dialog_in and dialog_out to read or store values.

DCL tile names of particular dialog should be stored inside localized variable dcl_tiles that is a list of tile names.

 

Here you also have helper functions list_to_file, file_to_list and replace_list_element that can be used to store values in a list for further usage in a code.

 

 

Miljenko Hatlak

EESignature

Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
0 Likes
Message 5 of 24

rkmcswain
Mentor
Mentor
@desmund08 wrote:

I tried saving them in USERS but the variable is rejected everytime I exit the program and returns as nil.

Of course @desmund08  - this is as designed, the USERS[1-5] variables are not saved at all. This is documented here. Save your variables somewhere else, such as the registry, or a file.

R.K. McSwain     | CADpanacea | on twitter
0 Likes
Message 6 of 24

desmund08
Contributor
Contributor

@rkmcswain I know variables are not saved within the drawing after you exit. It's okay if it will not be saved inside the drawing. But the variable values can be temporarily saved in USERS[1-5] as long as the drawing is still open. Values will only be lost after exiting. 

 

Actually USERS[1-5] is working in my other lisp but it's not working on the below program.

 

Below is my code:

 

 

 

(defun fruit_test ()
  (setq path1 "c:\\xxx\\")
  (setq q01 (strcat path1 "111"))
  (setq q02 (strcat path1"222"))
  (setq q03 (strcat path1 "333"))
  (setq q04 (strcat path1 "444"))
  (setq q05 (strcat path1 "555"))
  (setq q06 (strcat path1 "666"))
  (setq q07 (strcat path1 "777"))
  
  (setq patha "c:\\yyy\\")
  (setq t01 (strcat patha "xx1"))
  (setq t02 (strcat patha "xx2"))
  (setq t03 (strcat patha "xx3"))
  (setq t04 (strcat patha "xx4"))
  (setq t05 (strcat patha "xx5"))
  (setq t06 (strcat patha "xx6"))
  (setq t07 (strcat patha "xx7"))

  (setq pathb "c:\\zzz\\")
  (setq h01 (strcat pathb "y1"))
  (setq h02 (strcat pathb "y2"))
  (setq h03 (strcat pathb "y3"))
  (setq h04 (strcat pathb "y4"))
  (setq h05 (strcat pathb "y5"))
  (setq h06 (strcat pathb "y6"))
  (setq h07 (strcat pathb "y7"))

  (setq f1 (atoi (get_tile "fruit1"))
        f2 (atoi (get_tile "fruit2"))
        f3 (atoi (get_tile "fruit3"))
        s1  (atoi (get_tile "storage1"))
        s2  (atoi (get_tile "storage2"))
        s3  (atoi (get_tile "storage3"))
        qty1  (atoi (get_tile "quantity1"))
        qty2  (atoi (get_tile "quantity2"))
        qty3  (atoi (get_tile "quantity3"))
        qty4  (atoi (get_tile "quantity4"))
        qty5  (atoi (get_tile "quantity5"))
        qty10  (atoi (get_tile "quantity10"))
        qty15  (atoi (get_tile "quantity15"))
        RADIO1 (get_tile "RADIO1")
        RADIO2 (get_tile "RADIO2")
        RADIO3 (get_tile "RADIO3")
  );setq

);defun

(defun C:fruit () 
  (setvar "cmdecho" 0)

  (setq dcl_id (load_dialog "c:\\DCL_TEST.dcl" ))
  (if (not (new_dialog "FRUIT_TEST" dcl_id)) (exit)
  );if
  
    (if(/= (getvar "USERS1") "")
     (progn
        (setq RADIO1 (getvar "users1"))
        (setq RADIO2 (getvar "users2"))
        (setq RADIO3 (getvar "users3"))
        (set_tile "RADIO1" RADIO1)
        (set_tile "RADIO2" RADIO2)
        (set_tile "RADIO3" RADIO3)
      );progn
    );if

  (action_tile "cancel" "(setq dia 1)(done_dialog)")
  (action_tile "accept" "(setq dia 2)(fruit_test)(done_dialog)")

  (start_dialog)
  (unload_dialog dcl_id)

  (if (= dia 1) 
    (princ "\nCancelled.")
  );if

  (if (= dia 2) 
    (progn 
      (if (= f1 1) 
        (progn 
          (if (= s1 1) 
            (progn 
              (command "-insert" 
                       (if (= qty1 1) q01
                       (if (= qty2 1) q02
                       (if (= qty3 1) q03
                       (if (= qty4 1) q04
                       (if (= qty5 1) q05
                       (if (= qty10 1) q06
                       (if (= qty11 1) q07)))))))
                       pause 1 1 pause
              )
            )
          )
        )
      )
      
      (if (= f2 1) 
        (progn 
          (if (= s1 1) 
            (progn 
              (command "-insert" 
                       (if (= qty1 1) t01
                       (if (= qty2 1) t02
                       (if (= qty3 1) t03
                       (if (= qty4 1) t04
                       (if (= qty5 1) t05
                       (if (= qty10 1) t06
                       (if (= qty11 1) t07)))))))
                       pause 1 1 pause
              )
            )
          )
        )
      )

      (if (= f3 1) 
        (progn 
          (if (= s1 1) 
            (progn 
              (command "-insert" 
                       (if (= qty1 1) h01
                       (if (= qty2 1) h02
                       (if (= qty3 1) h03
                       (if (= qty4 1) h04
                       (if (= qty5 1) h05
                       (if (= qty10 1) h06
                       (if (= qty11 1) h07)))))))
                       pause 1 1 pause
              )
            )
          )
        )
      )
  )
  )
  
 (setvar "osmode" 175)
 (setvar "USERS1" RADIO1)
 (setvar "USERS2" RADIO2)
 (setvar "USERS3" RADIO3)
 (setvar "cmdecho" 1)
 (princ)
)

 

 

 

 

This is my dcl:

 

 

 

FRUIT_TEST: 
dialog {

label = "FRUIT TO BUY";

:row {

:column{

 
 width = 15; 
 fixed_height = true;
 fixed_width = true;


  : boxed_column {
        key = "RADIO1";
        label = "WHAT FRUIT?";
        

        :radio_button {
          label = "Apple";
           key="fruit1";
           }      

       :radio_button {
          label = "Orange";
            key="fruit2";
            
          }

      :radio_button {
          label = "Strawberry";
          key="fruit3";
          }
        }
        
        
  :boxed_column {
      key="RADIO2";
       label = "STORAGE";

       :radio_button{
       label="Plastic Bag";
       key="storage1";
       }
       :radio_button{
       label="Paper Bag";
       key="storage2";
       }
       :radio_button{
       label="No need";
       key="storage3";
       }
       }
       }


  : boxed_column{
       key="RADIO3";
       label="QUANTITY";
        
       :radio_button{
       label="1";
       key="quantity1";
       }
        :radio_button{
       label="2";
       key="quantity2";
       }
       :radio_button{
       label="3";
       key="quantity3";
       }
       :radio_button{
       label="4";
       key="quantity4";
       }
       :radio_button{
       label="5";
       key="quantity5";
       }
       :radio_button{
       label="10";
       key="quantity10";
       }
       :radio_button{
       label="15";
       key="quantity15";
       }
      
       }
       }
       
: row {
      : row {
         :button {
             key = "accept";
             label = "  OK  ";
             is_default = true;
             height=2.5;}

         :button {
             key = "cancel";
             label = "Cancel";
             is_default = false;
             is_cancel = true;
             height=2.5;
            }
      }

     }
   : spacer { width = 2.50;}
}

 

 

 

 

Thank you in advance.

 

Regards,

 

Desmund

0 Likes
Message 7 of 24

hak_vz
Advisor
Advisor

I you would use my code then simply use this pattern

 

(new_dialog "dialog_id" dcl_id)
(action_tile "bla" "(bla_action)")
.
.
.
(dialog_in (nth i _dialog_state_paths)); i is order num of file name
(start_dialog) 
(done_dialog id) 

 

In function that handle dialog before exit use dialog_out

Miljenko Hatlak

EESignature

Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
0 Likes
Message 8 of 24

desmund08
Contributor
Contributor

Thanks @hak_vz  but I have a limited knowledge in Autolisp and still learning. Actually I don't know how to add this in the code. I will still try to understand this and incorporate it.

This is still too much for me to understand. Anyways, thank you to those who replied.

 

Kind regards,

 

Desmund

0 Likes
Message 9 of 24

hak_vz
Advisor
Advisor

In attachment you have a sample lisp with dcl file. Try to figure out how it works.

Run it with command TESTDCL.

Place test.dcl in to root of your D disc or change path inside a code.

Best way to learn programming is to read code and to rewrite it to your particular case.

 

 

Miljenko Hatlak

EESignature

Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
Message 10 of 24

pbejse
Mentor
Mentor

@desmund08 wrote:

I have a lisp with dcl that is working already but I want my previous values to be the default value when I run the program again.

Desmund


I would use Drawing Properties. Not only the program will save the default on the current session, but also on the drawing itself. The last value will be the default wehn the file is opened once again.

 

(defun C:fruitBasket (/ _WhatIsSelected _SummaryInfo aDoc dProps dcl_id)
  (Defun _WhatIsSelected ()
    (mapcar
      '(lambda (r)
	 (vl-some '(lambda (rd)
		     (if (eq "1" (get_tile rd))
		       rd
		     )
		   )
		  r
	 )
       )
      '(("fruit1" "fruit2" "fruit3")
	("storage1" "storage2" "storage3")
	("quantity1"	  "quantity2"	   "quantity3"
	 "quantity4"	  "quantity5"	   "quantity10"
	 "quantity15"
	)
       )
    )
  )
  (defun _SummaryInfo (lst dp)
    ((lambda (n)
       (mapcar
	 '(lambda (key)
	    (cond
	      ((vl-catch-all-error-p
		 (vl-catch-all-apply
		   'vla-GetCustomByKey
		   (list dp (Car key) 'value)
		 )
	       )
	       (vla-AddCustomInfo dp (Car key) (Cadr key))
	       (Cadr key)
	      )
	      (lst
	       (vla-SetCustomByKey
		 dp
		 (Car key)
		 (setq v (nth (Setq n (1+ n)) lst))
	       )
	       v
	      )
	      (value)
	    )
	  )
	 '(("RADIO1" "fruit1")
	   ("RADIO2" "storage1")
	   ("RADIO3" "quantity1")
	  )
       )
     )
      -1
    )
  )

  (setq aDoc (vla-get-ActiveDocument (vlax-get-acad-object)))
  (setq dProps (vla-get-SummaryInfo aDoc))

  (setq dcl_id (load_dialog "D:\\Downloads\\DCL_TEST.DCL"))
  (if (not (new_dialog "FRUIT_TEST" dcl_id))
    (exit)
  )					;if

  (mapcar '(lambda (r) (set_tile r "1"))
	  (_SummaryInfo lst dProps)
  )
  (action_tile "cancel" "(setq dia 1)(done_dialog)")
  (action_tile
    "accept"
    "(setq lst (_WhatIsSelected))
  		(_SummaryInfo lst dProps)(setq dia 2) (done_dialog)"
  )

  (start_dialog)
  (unload_dialog dcl_id)
  lst
)

 

HTH 

Message 11 of 24

desmund08
Contributor
Contributor

Thanks @hak_vz. I will try to study this one later.

0 Likes
Message 12 of 24

desmund08
Contributor
Contributor

Thanks @pbejse  for always replying to my posts.

 

This one actually works but ther is one problem I encountered. When I change the tile, the object that will be inserted will be the same as previous. The correct block will only be inserted on the second try without changing the tiles.

(defun C:fruitBasket (/ _WhatIsSelected _SummaryInfo aDoc dProps dcl_id)
  
 (Defun _WhatIsSelected ()
    (mapcar
      '(lambda (r)
	 (vl-some '(lambda (rd)
		     (if (eq "1" (get_tile rd))
		       rd
		     )
		   )
		  r
	 )
       )
      '(("fruit1" "fruit2" "fruit3")
	("storage1" "storage2" "storage3")
	("quantity1"	  "quantity2"	   "quantity3"
	 "quantity4"	  "quantity5"	   "quantity10"
	 "quantity15"
	)
       )
    )
  )



  (defun _SummaryInfo (lst dp)
    ((lambda (n)
       (mapcar
	 '(lambda (key)
	    (cond
	      ((vl-catch-all-error-p
		 (vl-catch-all-apply
		   'vla-GetCustomByKey
		   (list dp (Car key) 'value)
		 )
	       )
	       (vla-AddCustomInfo dp (Car key) (Cadr key))
	       (Cadr key)
	      )
	      (lst
	       (vla-SetCustomByKey
		 dp
		 (Car key)
		 (setq v (nth (Setq n (1+ n)) lst))
	       )
	       v
	      )
	      (value)
	    )
	  )
	 '(("RADIO1" "fruit1")
	   ("RADIO2" "storage1")
	   ("RADIO3" "quantity1")
	  )
       )
     )
      -1
    )
  )



  (setq aDoc (vla-get-ActiveDocument (vlax-get-acad-object)))
  (setq dProps (vla-get-SummaryInfo aDoc))



  (setq dcl_id (load_dialog "D:\\Downloads\\DCL_TEST.DCL"))
  (if (not (new_dialog "FRUIT_TEST" dcl_id))
    (exit)
  )					;if




  (mapcar '(lambda (r) (set_tile r "1"))
	  (_SummaryInfo lst dProps)
  )

     (setq f1 (atoi (get_tile "fruit1"))
        f2 (atoi (get_tile "fruit2"))
        f3 (atoi (get_tile "fruit3"))
        s1  (atoi (get_tile "storage1"))
        s2  (atoi (get_tile "storage2"))
        s3  (atoi (get_tile "storage3"))
        qty1  (atoi (get_tile "quantity1"))
        qty2  (atoi (get_tile "quantity2"))
        qty3  (atoi (get_tile "quantity3"))
        qty4  (atoi (get_tile "quantity4"))
        qty5  (atoi (get_tile "quantity5"))
        qty10  (atoi (get_tile "quantity10"))
        qty15  (atoi (get_tile "quantity15"))
  );setq

  (action_tile "cancel" "(setq dia 1)(done_dialog)")
  (action_tile
    "accept"
    "(setq lst (_WhatIsSelected))
  		(_SummaryInfo lst dProps)(setq dia 2) (done_dialog)"
  )

 

  (start_dialog)
  (unload_dialog dcl_id)
  lst
       


  ;;;--- If the CANCEl button was pressed - display message
  (if (= dia 1) 
    (princ "\nCancelled.")
  );if
      


  
  ;;;--- If the OKAY button was pressed
  (if (= dia 2) 
    (progn 
      (if (= f1 1) 
        (progn 
          (if (= s1 1) 
            (progn 
              (command "-insert" 
                       (if (= qty1 1) q01
                       (if (= qty2 1) q02
                       (if (= qty3 1) q03
                       (if (= qty4 1) q04
                       (if (= qty5 1) q05
                       (if (= qty10 1) q06
                       (if (= qty15 1) q07)))))))
                       pause 1 1 pause
              )
            )
          )
        )
      )
      
      (if (= f2 1) 
        (progn 
          (if (= s1 1) 
            (progn 
              (command "-insert" 
                       (if (= qty1 1) t01
                       (if (= qty2 1) t02
                       (if (= qty3 1) t03
                       (if (= qty4 1) t04
                       (if (= qty5 1) t05
                       (if (= qty10 1) t06
                       (if (= qty15 1) t07)))))))
                       pause 1 1 pause
              )
            )
          )
        )
      )

      (if (= f3 1) 
        (progn 
          (if (= s1 1) 
            (progn 
              (command "-insert" 
                       (if (= qty1 1) h01
                       (if (= qty2 1) h02
                       (if (= qty3 1) h03
                       (if (= qty4 1) h04
                       (if (= qty5 1) h05
                       (if (= qty10 1) h06
                       (if (= qty15 1) h07)))))))
                       pause 1 1 pause
              )
            )
          )
        )
      )
  )
  )

 (princ)
)

 

0 Likes
Message 13 of 24

ronjonp
Advisor
Advisor

@pbejse  stored the return in 'lst' so all you need to do is add this below ( assuming your block names correspond to the results ).

 

(if (= dia 2)
  (progn (command "-insert" (car lst) "\\" 1 1 "\\")
	 (command "-insert" (cadr lst) "\\" 1 1 "\\")
	 (command "-insert" (caddr lst) "\\" 1 1 "\\")
  )
  (princ "\nCancelled.")
)

 

 

0 Likes
Message 14 of 24

john.uhden
Mentor
Mentor

@rkmcswain gave you the concise version of the correct answer.

I grew into saving the previous inputs to .dft files, so that a program (command) named IGZLPIG would have a default file named IGZLPIG.dft which would contain entries like...

dia=0.5

dir="Left"

Multiple=T

etc.

Then before you populate your dcl tiles, you read the file IGZLPIG.dft, extract the values (if present) and populate your tiles accordingly.  Of course if you Okay the dialog, you rewrite the .dft with the latest entered values.

Using files also has the added advantage that they can be copied to other workstations to become the defaults for others.

John F. Uhden

0 Likes
Message 15 of 24

pbejse
Mentor
Mentor
Accepted solution

@desmund08 wrote:

Thanks @pbejse  for always replying to my posts.

 The correct block will only be inserted on the second try without changing the tiles.


Permit me to modify your dcl file.

  :boxed_column {
      key="RADIO2";
       label = "STORAGE";

       :radio_button{label="Plastic Bag"; key="0";}
       :radio_button{label="Paper Bag"; key="1"; }
       :radio_button{label="No need";key="2";}
       		}
       }

  : boxed_column{
       key="RADIO3";
       label="QUANTITY";
        
       :radio_button{label="1";key="00";}
       :radio_button{label="2";key="01";}
       :radio_button{label="3";key="02";}
       :radio_button{label="4";key="03";}
       :radio_button{label="5";key="04";}
       :radio_button{label="10";key="05";}
       :radio_button{label="15";key="06";
       		}      
       }

The key represents the position of the path and block name respectively [ 0 index ]

  (setq _Path&block '(	("c:\\xxx\\" ("111" "222" "333" "444" "555" "666" "777"))
			("c:\\yyy\\" ("xx1" "xx2" "xx3" "xx4" "xx5" "xx6" "xx7"))
		    	("c:\\zzz\\" ("y1" "y2" "y3" "y4" "y5" "y6" "y7"))))

The lisp would be a lot shorter and includes all the combinations of fruit and storage

(cond
	  (	(zerop flag) (princ "\nCancelled.")
	   		)	  
	  (	(and (= flag 1)
		 (setq storage	(nth (atoi (Cadr lst)) _Path&block)
		       quantity	(nth (atoi (Caddr lst)) (cadr storage))
		 )
		 (findfile
		   (setq filetoInsert (strcat (car storage) quantity ".dwg"))
		 )
	    	)
		(command "-insert" filetoInsert "\\" 1 1 "\\")
	   		)
	   (	T  (princ (strcat "\n" filetoInsert " Not found"))
			)
	)

HTH

 

Message 16 of 24

desmund08
Contributor
Contributor

Thanks for this @pbejse. It's now working but how do I include the type of fruit to take effect on the program? When I change the fruit but same storage and quantity, the block inserted is always the same.

 

Regards,

 

Desmund

0 Likes
Message 17 of 24

pbejse
Mentor
Mentor

@desmund08 wrote:

When I change the fruit but same storage and quantity, the block inserted is always the same.


I see, post here what would be the result if 

Apple , Paper Bag, 5

Strawberry, Paper bag, 5

Strawberry, No need, 4

Orange,No need, 5

Apple , No need, 5

 

 

0 Likes
Message 18 of 24

desmund08
Contributor
Contributor

@pbejse wrote:

@desmund08 wrote:

When I change the fruit but same storage and quantity, the block inserted is always the same.


I see, post here what would be the result if 

Apple , Paper Bag, 5xx5

Strawberry, Paper bag, 5 xx5

Strawberry, No need, 4 - y4

Orange,No need, 5 - y5

Apple , No need, 5  - y5 

 

 


The storage and quantity are working fine. The block inserted changes when storage or quantity is changed also. Only the fruit that is not taking any effect.

 

When fruit is working there will be 3*3*7=63 different blocks with 9 paths.

 

Thanks in advance @pbejse 

 

0 Likes
Message 19 of 24

pbejse
Mentor
Mentor

@desmund08 wrote:

Apple , Paper Bag, 5xx5

Strawberry, Paper bag, 5 xx5

Strawberry, No need, 4 - y4

Orange,No need, 5 - y5

Apple , No need, 5  - y5 


What you posted is exactly what the result from the code

c:\yyy\xx5.dwg
c:\yyy\xx5.dwg
c:\zzz\y4.dwg
c:\zzz\y5.dwg
c:\zzz\y5.dwg

 I'm asking for the supposedly "correct" results Desmund

 

0 Likes
Message 20 of 24

desmund08
Contributor
Contributor

Oh. Sorry I thought the result from the program.

 

Say I have 9 paths,

path1 - for apple, plastic bag (blocks inside path are a1, a2,...a7)

path2 - for apple, paper bag (blocks inside path are b1, b2,...b7)

path3 - for apple, No need (blocks inside path are c1, c2,...c7)

path4 - for orange, plastic bag (blocks inside path are d1, d2,...d7)

path5 - for orange, paper bag (blocks inside path are e1, e2,...e7)

path6 - for orange, No need (blocks inside path are f1, f2,...f7)

path7 - for strawberry, plastic bag (blocks inside path are g1, g2,...g7)

path8 - for strawberry, paper bag (blocks inside path are h1, h2,...h7)

path9 - for strawberry, No need (blocks inside path are i1, i2,...i7)

where,

a1 to a7, b2 to b7,...i1 to i7 corresponds the quantity

 

When I select strawberry, No need and choose 1 quantiy, the block that will be inserted is i1.

When I select orange, plastic bag and choose 4 quantites, the block that will be inserted is d4.

 

Thank you in advance @pbejse .

 

0 Likes