dxfin

 hi can any one help.
i have a lisp file that works in AutoCad , but dosn't in Bricscad 

[code](defun c:diein ()
 
   (setq UserOS (getvar "osmode"))
   (setq Userdimsize (getvar "dimtxt"))
   (setq UserUcsion (getvar "ucsicon"))
   
   (command "_dxfin" "c:/profile/temp/die.dxf")
 
    (setvar "osmode" UserOS)
    (setvar "dimtxt" Userdimsize)
    (setvar "ucsicon" UserUcsion)
   (command "zoom""e""zoom"".85x")
  (princ)
)


Comments

  • Sorry, but I don't get it:
    I understand neither what this script is all about (no need to save and restore variables when reading in a dxf, imo), nor why it shouldn't work (it certainly does so on my linux box, when I adjust the path to point to an existing file).
    You would need to be more specific as to what the problem is...
  •  Hi Knut

    sorry i haven't made this very clear...
    what is meant to happen is to load a DXF file from a the same folder every time by clicking on a button on a tool bar.
    we always save a DXF file from CorelDraw to the sample folder all the time. it always has the same name (DIE.dxf)

    this routine works in AutoCad 20010
    (defun c:diein ()    (setq UserOS (getvar "osmode"))   (setq Userdimsize (getvar "dimtxt"))   (setq UserUcsion (getvar "ucsicon"))        (command "_dxfin" "c:/profile/temp/die.dxf")    (setvar "osmode" UserOS)    (setvar "dimtxt" Userdimsize)    (setvar "ucsicon" UserUcsion)
    (command "zoom""e""zoom"".85x")
    (princ))



  • Jim, as mentioned by Knut, your code works OK. There must be another issue: DXF format? Path? Diesel?
  •  Hi Roy

    i have managed to drag and drop the dxf file in with out any problems, and i can type DXFIN and locate the file and open it without any problems

    i wonder if bricscad has an issue with the path ?

    Jim.

  • Try \\ intead of /
  •  Hi Patrik

    just changed them to \\ and it works .
    many thanks 
    Jim

  • Looks like a bug to me... as far as I can remember, the slash should work on all platforms.
This discussion has been closed.