after OnEnteringNoDocState

Started by velasquez, November 12, 2014, 02:34:47 PM

Previous topic - Next topic

velasquez

Hello,
I created a variable when the last drawing was closed with OnEnteringNoDocState.
When a new design is created an error happens when I work with this variable.
The file "OpenDCL arx ....." has not yet been reloaded.
error: no function definition: dcl_Form_Show

How to check the load arx file to move forward?

I'm working with the code below.
;;;the last drawing was closed
(defun c:dc_MainMenu_cBarMax_OnEnteringNoDocState (/)
  (vl-bb-set 'JoyFormName 'dc_MainMenu_cBarMax)
  (dcl_Form_Close dc_MainMenu_cBarMax)
)

;;;new design is created
(if (vl-bb-ref 'JoyFormName)
  (progn
  (dcl_Form_Show (eval (vl-bb-ref 'JoyFormName)))
    (vl-bb-set 'JoyFormName NIL)
  ) ;_ fim de progn
) ;_ fim de if

owenwengerd

What do you mean by "new design"? What steps are you performing, and in what context is that code executing?
Owen Wengerd (Outside The Box) / ManuSoft

velasquez

Quote from: owenwengerd on November 12, 2014, 08:19:02 PM
What do you mean by "new design"? What steps are you performing, and in what context is that code executing?

I meant opening a new drawing.

1 - Open a new drawing.
2 - Call dcl_Form_Show with variable saved in OnEnteringNoDocState.
3 - Working with OnInitialize and ... TabStrip_OnSelChanging.

owenwengerd

Do I understand correctly that you call (dcl-Form-Show) from OnInitialize and OnSelChanging? From a different form, I guess? How are those events being triggered?
Owen Wengerd (Outside The Box) / ManuSoft

velasquez

Quote from: owenwengerd on November 13, 2014, 07:31:09 AM
Do I understand correctly that you call (dcl-Form-Show) from OnInitialize and OnSelChanging? From a different form, I guess? How are those events being triggered?
Hi Owen,
With my English is very difficult to explain to you
But I managed to solve my problem working with (vl-load-all my_function) in Visual Lisp.

"vl-load-all -> Loads a file into all open AutoCAD documents, and into any document subsequently opened during the current AutoCAD session"

Thanks for your help