DWG thumbnail

Started by aslani, March 12, 2009, 03:42:42 PM

Previous topic - Next topic

aslani

Hi,

I have a problem with this part of my code:

  (if Parent
    (progn
      (setq Dwgname (strcat path2 "\\" Parent "\\" Child "\\" Value ".dwg"))
      (if (/= Dwgname nil)
(dcl_DwgPreview_LoadDwg diaDwgPrev Dwgname)
      )
    )
    (progn
      (setq Dwgname (strcat path2 "\\" Child "\\" Value ".dwg"))
      (if (/= Dwgname nil)
(dcl_DwgPreview_LoadDwg diaDwgPrev Dwgname)
      )
    )


The tree and list boxes are working beautifully, but when dcl_DwgPreview_LoadDwg, it gives me this error:
Quote
An OpenDCL function argument processing exception has occured!

Error: NIL value not allowed
Function: dcl_DwgPreview_LoadDwg
Argument: 0

But obviously, if you look at my codes, it won't even call this command if "Dwgname" is nil. I even used "BLKLIBoDCL_frmBlkLib_diaDwgPrev" just to make sure that it calls the right control, but I still get the same error. What buffles me is that the ViewDWG sample code works just fine using the same "Dwgname" variable.

The AutoCAD command line displays "ADS request error".

Am I missing something?

Thanks.

aslani

Ok nevermind. I simply moved the control on top of the Ztab order list and it works.

Any information about how the order in ztab affects the whole project?  :-\

BazzaCAD

Hmm the Z/Tab should have an effect that I know of.
But you should definitely be calling:
(dcl_DwgPreview_LoadDwg BLKLIBoDCL_frmBlkLib_diaDwgPrev Dwgname)

It's hard to tell without seeing how the path is working...
a.k.a.
Barry Ralphs
barryDOTralphsATgmailDOTcom