Author Topic: An error has occurred inside the *error* function  (Read 5892 times)

0 Members and 1 Guest are viewing this topic.

LE

  • Guest
Re: An error has occurred inside the *error* function
« Reply #15 on: October 05, 2007, 04:42:56 PM »
Maybe you could test by removing the use of cmdactive and simple place the 'PAUSE' in the command line.

Code: [Select]
(defun c:Devices_frmDevices_cmdInsert_OnClicked ( / sSelKey sSelText rValue xValue xText grp)
   (setq sSelKey (dcl_Tree_GetSelectedItem Devices_frmDevices_TreeControl))
   (setq sSelText (dcl_Tree_GetItemText Devices_frmDevices_TreeControl sSelKey))

   (setq rValue (dcl_Tree_GetParent Devices_frmDevices_TreeControl sSelKey))
   (setq xValue (dcl_Tree_GetParent Devices_frmDevices_TreeControl rValue))

   (setq xText  (dcl_Tree_GetItemText Devices_frmDevices_TreeControl xValue))

   (setq grp (dictsearch (namedobjdict) "AECB_DEVICE_STYLES"))
   (if (setq g2 (dictsearch (cdr (assoc -1 grp)) sSelText))
      (progn
         (princ (strcat "\n Insert device " sSelText "  (Press Enter to end command)"))
         (command "-AecbDeviceAdd" "sy" "Standard" "st" sSelText "l" "o" pause)
      )
      (progn
         (princ (strcat "\n Insert device " sSelText "  (Press Enter to end command)"))
         (command "-insert" (strcat "*S:\\CADDdata\\MEP_2008\\Content\\Aecb Content\\US Imperial\\Electrical\\Devices\\" xText) "0,0" "" "")
         (command "-AecbDeviceAdd" "sy" "Standard" "st" sSelText "l" "o" pause)
      )
   )
   (princ)
)

I only use napolitano autocad flavour....

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: An error has occurred inside the *error* function
« Reply #16 on: October 05, 2007, 07:21:02 PM »
Matt,
If you load this from the VLIDE what does the menu Debug->LastBreakSource take you to. ?

Have you tried to animate the debug from the VLIDE ?

I'd also consider adding an error handler specific to the routine.

added:
.. Only have Vanilla here so can't test in full.
« Last Edit: October 05, 2007, 08:47:36 PM by Kerry Brown »
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.