Author Topic: SLB files not loading.  (Read 1018 times)

0 Members and 1 Guest are viewing this topic.

squirreldip

  • Newt
  • Posts: 114
SLB files not loading.
« on: June 26, 2023, 08:46:54 PM »
I have a routine (a few actually) that uses .slb files to load images into DCL dialog boxes.  They've been working for years but have stopped in some versions of AutoCAD (and C3D).

I thought it was newer versions as we've recently upgraded to C3D 2022 in the office (not working in the office install of C3D 2022) - they do load at home in both AutoCAD 2023 & C3D 2023 but not at home in C3D 2024.

The slb's are located in the %temp% folder and confirmed they do exist.  I'm hoping this is just a security setting but can't find it.

Hopefully someone has come across this with a solution.

Thanks in advance!

Edit:  I tried copying the slb to another folder (my documents folder) and still not working.
« Last Edit: June 26, 2023, 08:52:29 PM by squirreldip »

BIGAL

  • Swamp Rat
  • Posts: 1418
  • 40 + years of using Autocad
Re: SLB files not loading.
« Reply #1 on: June 27, 2023, 04:39:42 AM »
I am using a slb made like 20 years ago and no problems. My slb is in a support path and same path is set to trusted. Did you do the call correctly, slb then slide ?
eg ctone is name of slb
[CTONE(CHAIR-1)]^c^cINSERT ca3ch-1 DRAG \1;;DRAG
A man who never made a mistake never made anything

ribarm

  • Gator
  • Posts: 3279
  • Marko Ribar, architect
Re: SLB files not loading.
« Reply #2 on: June 27, 2023, 06:48:37 AM »
%temp% folder shoud be in SFSP, so if *.slb are there, CAD had to find them with (findfile *.slb)  * - somename...
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube

squirreldip

  • Newt
  • Posts: 114
Re: SLB files not loading.
« Reply #3 on: June 27, 2023, 10:45:22 AM »
The file is referenced using the full path - so being in the search shouldn't be an issue.  The exact same routine works in some versions (and has for years) but recently it stopped working in 2022 (my office) and 2024 (home).

Lee Mac

  • Seagull
  • Posts: 12915
  • London, England
Re: SLB files not loading.
« Reply #4 on: June 27, 2023, 01:53:45 PM »
When you say that it doesn't work, what exactly is the obseved behaviour? Do you receive an error message (possibly at the command line after the dialog is dismissed) or are the slide images simply not displayed?

squirreldip

  • Newt
  • Posts: 114
Re: SLB files not loading.
« Reply #5 on: June 27, 2023, 02:16:36 PM »
Slide images simply not displaying - no error messages.

I've tried moving the slb out of the %temp% folder and am accessing using the following:

"C:\\temp\\rfl0bm.slb(SPOTELEVATION)"

The file and folder exists, the slide is in the slb.  The code works in 2019.
« Last Edit: June 27, 2023, 02:26:17 PM by squirreldip »

ribarm

  • Gator
  • Posts: 3279
  • Marko Ribar, architect
Re: SLB files not loading.
« Reply #6 on: June 27, 2023, 03:43:46 PM »
What do you get when you type in CAD :

(findfile "C:\\temp\\rfl0bm.slb")

If you get "C:\\temp\\rfl0bm.slb", then try :

(findfile "rfl0bm.slb")

If you get also "C:\\temp\\rfl0bm.slb" then file is recognized and there is no need to add "C:\\temp" in SFSP...

So, the problem is in corrupted *.slb file(s)... Try to remake them with MSLIDE command, or something like so (I forgot how I made last one of mines...)

Regards, stay well, M.R.
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube

squirreldip

  • Newt
  • Posts: 114
Re: SLB files not loading.
« Reply #7 on: June 27, 2023, 06:56:41 PM »
I found the problem but only a partial solution...

TLDR it was a corrupt file.

I am using MP's method to read and write byte streams to create the slb files in the users temp folder.  Yes, I know this may not be the best way but I find it really nice being able to create all my code in one vlx without needing all kinds of support files (blocks, dcl, etc, etc...)

MP's post is here for reference:
https://www.theswamp.org/index.php?topic=17465.msg210396

There is an issue somewhere depending on which version of AutoCAD is being used - if anyone has some thoughts on this it would be good to see your ideas.

Thanks to all so far and ribarm for pointing me in the right direction.

squirreldip

  • Newt
  • Posts: 114
Re: SLB files not loading.
« Reply #8 on: June 28, 2023, 12:50:11 PM »
I've revised my reading and writing to use ADOStream - seems to be working now.