SLD extenstion problem

Discussion in 'AutoCAD' started by Matt W, Jul 19, 2004.

  1. Matt W

    Matt W Guest

    I've got a script that *used* to work (this was back in R14 and 2000).
    When I run the scirpt now (which is used to create slides), all I get is the
    file name I.E. Drawing1 with no SLD extension.

    Is there some silly sysvar that controls whether the SLD is added when
    running MSLIDE from a script??!?


    Thanks in advance!
     
    Matt W, Jul 19, 2004
    #1
  2. Matt W

    ECCAD Guest

    This is what I use in our Block Manager:
    ; set 'dwgs' to a list of your blocks..or drawings..
    (foreach dwg dwgs
    (setq sld (strcat (substr dwg 1 (- (strlen dwg) 4)) ".sld"))
    (if (null (member sld sld_list))
    (progn
    (command "_.erase" "_all" "")
    (setvar "ATTREQ" 0)
    (command ins (strcat path dwg) "0,0" "1" "1" "0")
    (setvar "ATTREQ" 1)
    (command "_.zoom" "_e")
    (command "_.zoom" "_s" "0.85xp")
    (if (not (findfile (strcat path sld)))
    (command "_.mslide" (strcat path sld))
    ); end if
    (princ)
    ); end progn
    ); end if
    ); end foreach

    Bob
     
    ECCAD, Jul 19, 2004
    #2
  3. Matt W

    ECCAD Guest

    Change:
    (command ins (strcat path dwg) "0,0" "1" "1" "0")
    To:
    (command "-insert" (strcat path dwg) "0,0" "1" "1" "0")

    Bob
     
    ECCAD, Jul 19, 2004
    #3
  4. This is my post of 25 November 2003 19.50:

    --

    Subject:
    AutoCAD 2004: Slidelib.exe: a long story & Mslide from command line

    --

    Message:
    O.S. = XP Pro 2002 - Sp.1 - Ita
    AutoCAD = 2004 Ita - Sp.1

    1) if I use MSLIDE from a script or command line the out file
    is without extension (SLD), try:

    FILEDIA <1>: 0
    Comando: _mslide
    Slide File name <E:\Acad_Files\ProvaPdf01>: <enter>
    I get a real slide file "ProvaPdf01" but with no extension

    --

    2) I have tried slidelib.exe of Autocad 2004 sp.1
    but it still not works as all previous versions.

    I still using R12 - 04/06/1997 20.51 - 24 Kb
    Any hint.

    --

    Here are all the version I have tried:

    R12 > slidelib.exe: 04/06/1997 20.51 - 24 Kb
    SLIDELIB 1.2 (3/8/89)
    (C) Copyright 1987-89 Autodesk, Inc.

    R13 c4 > slidelib.exe: 12/11/1995 1.20 - 420 Kb
    SLIDELIB 1.2 (3/8/89)
    (C) Copyright 1987-1989,1994,1995 Autodesk, Inc.

    R14.01 > slidelib.exe: 05/06/1997 4.16 - 420 Kb
    SLIDELIB 1.2 (3/8/89)
    (C) Copyright 1987-1989,1994,1995 Autodesk, Inc.

    R15 > slidelib.exe: 11/30/1995 6.28 - 420 Kb
    SLIDELIB 1.2 (3/8/89)
    (C) Copyright 1987-1989,1994,1995 Autodesk, Inc.

    R16 > slidelib.exe: 12/11/1995 6.30 - 425 Kb
    SLIDELIB 1.2 (3/8/89)
    (C) Copyright 1987-1989,1994,1995 Autodesk, Inc.

    --

    20/07/2003
    I have tried slidelib.exe of Autocad 2005
    but it still not works as all previous versions:

    R16.1 > slidelib.exe: 09/06/2003 22.29 - 41 Kb
    SLIDELIB 1.2 (6/4/2003)
    (C) Copyright 1987-1989,1994-1996, 2003 Autodesk, Inc.

    --

    HTH

    Marc'Antonio Alessi
    http://xoomer.virgilio.it/alessi
    (strcat "NOT a " (substr (ver) 8 4) " guru.")
     
    Marc'Antonio Alessi, Jul 20, 2004
    #4
  5. Matt W

    ECCAD Guest

    Save the below as mslide.lsp, in a support folder.

    ;;Make Slide.
    ;;Setup your 'real' slides path below
    (setq Path "C:/acad/")
    (setq sld (getvar "dwgname"))
    (setq sld (strcat (substr sld 1 (- (strlen sld) 4)) ".sld"))
    (command "_.mslide" (strcat Path sld))
    (princ)

    In script do:
    Open
    sheet1
    (load"mslide")
    close
    open
    sheet2
    (load"mslide")
    .........

    Bob
     
    ECCAD, Jul 20, 2004
    #5
  6. Matt W

    T.Willey Guest

    T.Willey, Jul 20, 2004
    #6
  7. Matt W

    Matt W Guest

    Thanks, Bob!
    Just the fix I needed.

    Is it just me, or didn't R14 & 2000 add the SLD extension "auto-magically"??

    --
    Matt W

    The difference between genius and stupidity is that genius has its limits.
    | Save the below as mslide.lsp, in a support folder.
    |
    | ;;Make Slide.
    | ;;Setup your 'real' slides path below
    | (setq Path "C:/acad/")
    | (setq sld (getvar "dwgname"))
    | (setq sld (strcat (substr sld 1 (- (strlen sld) 4)) ".sld"))
    | (command "_.mslide" (strcat Path sld))
    | (princ)
    |
    | In script do:
    | Open
    | sheet1
    | (load"mslide")
    | close
    | open
    | sheet2
    | (load"mslide")
    | ........
    |
    | Bob
     
    Matt W, Jul 21, 2004
    #7
  8. Matt W

    ECCAD Guest

    I know R14 'assumes' the .sld.
    In recent versions..when you do a file open, then mslide at the command prompt, you get a dialog that allows for files of type "*.sld" (little pull-down). If you just hit return, the dialog already has the filename.sld in the text box and will save under the 'default' or present folder. If you want to save the .sld file as a different name, you have to supply the .sld extension.

    Bob
     
    ECCAD, Jul 21, 2004
    #8
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.