2014-08-29 19:09 UTC
I have not had this problem.
;;;Close the MODAL FORM
;;;The main function starts here
(defun JoyQuantificar (JoySelectionSet / ...)
(defun c:DuctilCAD_RelacaoMateriais_BotaoTabela_OnClicked (/ JoyExportFile JoyObjTable)
;;;
;;;Close
(dcl_form_close DuctilCAD_RelacaoMateriais)
;;;Close the form and asks the insertion point for the table
(if (null (setq JoyTablePt (getpoint "\nIndique o ponto para o canto superior esquerdo da tabela: "))
) ;_ fim de null
(progn ;_ if there is no insertion point
(setq JoyNext T) ;_ Back to the form -> OK
(princ "\n")
) ;_ fim de progn
;;;Closes the form and asks the insertion point for the table
(setq JoyObjTable
(JoyTabelaMaior
JoyTablePt
(dcl_control_gettext DuctilCAD_RelacaoMateriais_TextBoxTitulo)
) ;_ fim de JoyTabelaMaior
) ;_ fim de setq
) ;_ fim de if
(if JoyObjTable ;_ Table OK
(progn (vlax-release-object JoyObjTable)
(princ "\nTabela gerada com sucesso!")
(setq JoyNext T) ;_ back to the form
;;;
;;;At this point the form has been displayed but the table is not yet on the screen.
;;;It will only appear when the human form is closed.
) ;_ fim de progn
) ;_ fim de if
) ;_ fim de defun
;;;
;;;--------------------------------------------------------------------------
;;;Creates a table with vla-addtable
(defun JoyTabelaMaior (JoyTablePt JoyTitulo /)
;....
(setq obj
(vla-addtable
(JoyGetActiveSpace)
(vlax-3d-point (trans JoyTablePt 1 0))
(+ 3 (length JoyListaBase)) ; acrescentei a linha do subtitulo
(length (car JoyListaBase)) ;_ numero de colunas
JoyAlturadoTexto
(/ (apply '+ JoyListadasLarguras) (float 8)) ;_ media do total das larguras
) ;_ fim de vla-addtable
) ;_ fim de setq
;;;Table processes
;;;
(vla-put-regeneratetablesuppressed obj :vlax-false)
obj ;- If OK returns the vla-object
) ;_ fim de defun
;;;--------------------------------------------------------------------------
;;;
;;;Tudo trabalha bem aqui
(defun c:DuctilCAD_RelacaoMateriais_OnInitialize (/ JoyTitulo JoyQuantidade)
;;;Quantidade de elementos selecionados
(setq JoyQuantidade (sslength JoySelectionSet))
;;;;
;;;
;;;Centraliza o quadro
(dcl_form_center DuctilCAD_RelacaoMateriais)
) ;_ fim de defun
;;;
;;;This is the loop that has always worked well for me.
;;;but in this case I can always ask several points of insertion and insert blocks and then back to the form
;;;loop of the form
(setq JoyNext T)
(while JoyNext
(setq JoyNext NIL)
(dcl_form_show DuctilCAD_RelacaoMateriais)
) ;_ fim de while
;;;
) ;_ The main function ends here
To work around I am using (initget ..
to ask the user if he wants to return to the frame or not.
ODCL_MESSAGEBOX also does what I need.
Has anyone experienced this?
Thanks
;;;Close the MODAL FORM
;;;The main function starts here
(defun JoyQuantificar (JoySelectionSet / ...)
(defun c:DuctilCAD_RelacaoMateriais_BotaoTabela_OnClicked (/ JoyExportFile JoyObjTable)
;;;
;;;Close
(dcl_form_close DuctilCAD_RelacaoMateriais)
;;;Close the form and asks the insertion point for the table
(if (null (setq JoyTablePt (getpoint "\nIndique o ponto para o canto superior esquerdo da tabela: "))
) ;_ fim de null
(progn ;_ if there is no insertion point
(setq JoyNext T) ;_ Back to the form -> OK
(princ "\n")
) ;_ fim de progn
;;;Closes the form and asks the insertion point for the table
(setq JoyObjTable
(JoyTabelaMaior
JoyTablePt
(dcl_control_gettext DuctilCAD_RelacaoMateriais_TextBoxTitulo)
) ;_ fim de JoyTabelaMaior
) ;_ fim de setq
) ;_ fim de if
(if JoyObjTable ;_ Table OK
(progn (vlax-release-object JoyObjTable)
(princ "\nTabela gerada com sucesso!")
(setq JoyNext T) ;_ back to the form
;;;
;;;At this point the form has been displayed but the table is not yet on the screen.
;;;It will only appear when the human form is closed.
) ;_ fim de progn
) ;_ fim de if
) ;_ fim de defun
;;;
;;;--------------------------------------------------------------------------
;;;Creates a table with vla-addtable
(defun JoyTabelaMaior (JoyTablePt JoyTitulo /)
;....
(setq obj
(vla-addtable
(JoyGetActiveSpace)
(vlax-3d-point (trans JoyTablePt 1 0))
(+ 3 (length JoyListaBase)) ; acrescentei a linha do subtitulo
(length (car JoyListaBase)) ;_ numero de colunas
JoyAlturadoTexto
(/ (apply '+ JoyListadasLarguras) (float 8)) ;_ media do total das larguras
) ;_ fim de vla-addtable
) ;_ fim de setq
;;;Table processes
;;;
(vla-put-regeneratetablesuppressed obj :vlax-false)
obj ;- If OK returns the vla-object
) ;_ fim de defun
;;;--------------------------------------------------------------------------
;;;
;;;Tudo trabalha bem aqui
(defun c:DuctilCAD_RelacaoMateriais_OnInitialize (/ JoyTitulo JoyQuantidade)
;;;Quantidade de elementos selecionados
(setq JoyQuantidade (sslength JoySelectionSet))
;;;;
;;;
;;;Centraliza o quadro
(dcl_form_center DuctilCAD_RelacaoMateriais)
) ;_ fim de defun
;;;
;;;This is the loop that has always worked well for me.
;;;but in this case I can always ask several points of insertion and insert blocks and then back to the form
;;;loop of the form
(setq JoyNext T)
(while JoyNext
(setq JoyNext NIL)
(dcl_form_show DuctilCAD_RelacaoMateriais)
) ;_ fim de while
;;;
) ;_ The main function ends here
To work around I am using (initget ..
to ask the user if he wants to return to the frame or not.
ODCL_MESSAGEBOX also does what I need.
Has anyone experienced this?
Thanks
