Henrique
no prob it's never bad to test things out. either way you know if it's for good or not.
Ok Update, i read your answer and continued testing. it could be the server or the dialog. And with the server no luck i put everything in trusted and everything what isn't trusted can enter to now :D.
So i went on the dialog then and made some changes after 20 times.
first off all the command was in the progress of the action key, so if you look bollow it's changed to a dialog number (althought that dialogsettings is a bermuda for me)
second of all i took that command out of my 999st subfunction and made another function. Also in that one i changed command to command-s.
And now it's seem to be working. Thanks for the answer. My lisp has quite grow since last time right ;). but problaby not very clean :p. still need a lot of testing.
i m actually thinking that command-s was prob the only thing i needed 😄
Oh i m sitting at home also, but i m working with teamviewer. otherwise i need to change all my folders and options in my default pc at home. for personal use it's free. it's no product of my so if it's against the violations of this forum i can always delete it.
http://www.teamviewer.com/en/index.aspx?pid=google.tv_exact.s.int&gclid=CNP96dPu6cMCFWTMtAod-C0A2A
(defun c:DOSSIER ( / value3 name Name1 Name2 Name3 Name4 ddiag activedocument
acadobject dcl_id name@ name# string Projectnaam Remember)
;;;--- Set Active document
(setq acadobject (vlax-get-acad-object))
(setq activedocument (vla-get-activedocument acadobject))
;;;--- Make list Name
(setq name '("DOSSIERNUMMER" "PROJECTNAAM" "AFK ELEMENT" "BETREFT1" "BETREFT2" "AANNEMER" "ADRESAANNEMER1" "ADRESAANNEMER2"
"STRAATBOUWPLAATS" "POSTCODE" "BOUWPLAATS" "PROVINCIE" "BOUWHEER" "BOUWHEERADRES1" "BOUWHEERADRES2" "ARCHITECT"
"ARCHITECTADRES1" "ARCHITECTADRES2" "BEK TEKENAAR" "WAP TEKENAAR" "VELLINGK. BALK.KOLOM" "VELLINGK. WAND"
"KWALITEIT BETON" "GEBRUIKSDOMEIN" "OMGEVINGSKLASSE" "CONSISTENTIEKLASSE" "KORRELAFM NOM." "MIN. DEKKING"
));SETQ
(setq ddiag 4)
(while (> ddiag 2)
;;;--- Load the dcl file from disk into memory
(if(not(setq dcl_id (load_dialog "DOSSIER.dcl")))
(progn
(alert "The DCL file could not be loaded!")
(exit)
);PROGN
;;;--- Else, the dcl file was loaded into memory
(progn
;;;--- Load the definition inside the DCL file
(if (not(new_dialog "DOSSIER" dcl_id))
(progn
(alert "The DOSSIER definition could not be loaded!")
(exit)
);PROGN
;;;--- Else, the definition was loaded
(progn
;;;--- Put mode tile gray for excel data
(Foreach x name
(setq name@ (strcat x "@"))
(mode_tile name@ 1)
);FOREACH
(mode_tile "OPMERKING" 1)
(mode_tile "SelectAll" 1)
(mode_tile "SelectNone" 0)
(foreach x name
(setq name# (strcat x "#"))
(action_tile name# "(CheckSelect) (ToggleRow1) (ToggleRow2) (ToggleRow3) (ToggleRow4) (ToggleRow5)
(ToggleRow6) (ToggleRow7) (ToggleRow8) (ToggleRow9) (ToggleRow10) (ToggleRow11)")
)
(action_tile "Selectrow1" "(GetRow1) (CheckSelect)")
(action_tile "Selectrow2" "(GetRow2) (CheckSelect)")
(action_tile "Selectrow3" "(GetRow3) (CheckSelect)")
(action_tile "Selectrow4" "(GetRow4) (CheckSelect)")
(action_tile "Selectrow5" "(GetRow5) (CheckSelect)")
(action_tile "Selectrow6" "(GetRow6) (CheckSelect)")
(action_tile "Selectrow7" "(GetRow7) (CheckSelect)")
(action_tile "Selectrow8" "(GetRow8) (CheckSelect)")
(action_tile "Selectrow9" "(GetRow9) (CheckSelect)")
(action_tile "Selectrow10" "(GetRow10) (CheckSelect)")
(action_tile "Selectrow11" "(GetRow11) (CheckSelect)")
(if Remember
(progn
(foreach x Remember
(setq Name1 (car x)) ;;name customprop
(if
(= (cadr x) "None")
(setq Name2 "")
(setq Name2 (cadr x))
);; custompropvalue
(if
(= (caddr x) "None")
(setq Name3 "")
(setq Name3 (caddr x)) ;;excel value
)
(setq Name4 (strcat Name1 "@"));; name excel value
(set_tile Name1 Name2)
(Set_tile Name4 Name3)
);foreach
);progn
);If
;;;--- If an action event occurs, do this function
(mode_tile "Projectnumber" 2)
(action_tile
"loadcustom"
"(CUSTOMPROPERTIES) (customClick)")
(action_tile "Deletecustom" "(Deletecustom) (CheckSelect)")
(action_tile "Createcustom" "(Createcustom) (CheckSelect)")
(action_tile "loadexcel" "(GetExcel) (excelclick) (CheckSelect)")
(action_tile "Getexcel" "(Setcustom) (Changeclick) (CheckSelect)")
(action_tile "Putexcel" "(ExtractCAD)")
(action_tile "Editexcel" "(PutExOn)")
(action_tile "cancel" "(done_dialog 0)")
(action_tile "SelectAll" "(Toggleselectall)(CheckSelect)" )
(action_tile "SelectNone" "(ToggleselectNone)(CheckSelect)" )
(action_tile "SelectNone" "(ToggleselectNone)(CheckSelect)" )
(action_tile "hide" "(Hide)" )
(action_tile "GETDRAWING" "(teken)" )
(action_tile "GETEXCELPLANLIJST" "(GETEXCELPLANLIJST)" )
(action_tile "PUTEXCELPLANLIJST" "(Getprojectnumber) (PUTEXCELPLANLIJST) (done_dialog 1)" )
;;;--- Display the dialog box
(setq ddiag(start_dialog))
(if (= ddiag 4)
(progn
(progn
(setq string (getstring "\nPress anything if ready"))
);progn
);Progn
);IF
;;;--- Unload the dialog box
(unload_dialog dcl_id)
;;;--- If the user pressed the Cancel button
(if(= ddiag 0)
(princ "\n DOSSIER cancelled!")
);IF
(if(= ddiag 1)
(Sillycommandforscript)
);IF
);PROGN
);IF
);PROGN
);IF
);while
;;;---Regenerate CAD
(vla-regen activedocument 1)
;;;---Clean 5 times unused objects
(repeat 5 (gc))
(princ)
);DEFUN
(defun PUTEXCELPLANLIJST ( / dossval DWGprefix Externfolder script Drawings Drawing Files
sf dossfile TextDoss)
(setq DWGprefix (getvar "dwgprefix"))
(setq Externfolder (strcat DWGprefix "\#Library-Do Not Edit#"))
(setq TextDoss (strcat Externfolder "\\BinDossVal.txt"))
(setq dossfile (open TextDoss "R"))
(setq dossval (read-line dossfile))
(close dossfile)
(if (= GetValList1 nil)
(setq Drawings(GetFiles))
(setq Drawings (GetValList1))
)
(setq ThisDwg (strcat DWGprefix (getvar "dwgname")))
(setq script (strcat Externfolder "\\BinOpenDWGforTitleblock.SCR"))
(foreach x Drawings
(setq Drawing (strcat DWGprefix x ".dwg"))
(if (not(= Drawing ThisDwg))
(setq Files (cons Drawing Files))
)
)
(if (> (length Files) 0)
(progn
(setq sf (open script "w"))
(write-line "Filedia" sf)
(write-line "0" sf)
(foreach dwg Files
(write-line "_.open" sf)
(write-line (strcat "\""dwg "\"") sf)
(write-line "(load \"Dossier\")" sf)
(write-line "DISTRIBUTEEXCELPLANNLIJST" sf)
(write-line "_.qsave" sf)
(write-line "_.close" sf)
)
(write-line "Filedia" sf)
(write-line "1" sf)
(close sf)
)
)
;;;
;;; )
;;; )
(princ)
); Defun
(defun c:Sillycommandforscript (/ DWGprefix Externfolder script)
(setq DWGprefix (getvar "dwgprefix"))
(setq Externfolder (strcat DWGprefix "\#Library-Do Not Edit#"))
(setq script (strcat Externfolder "\\BinOpenDWGforTitleblock.SCR"))
(command-s "script" script )
)