help again

Discussion in 'AutoCAD' started by spencer1971, Jun 9, 2004.

  1. spencer1971

    spencer1971 Guest

    The following extracts a part drawing to a new wblock with suffixed filename. I want top open and run a plotting script (allready written) when the block is created.

    is (command "open" fname) a reasonable command, Its seems to be ignored and the script file runs in the original drawing (nothing opens) if not is it possible to open and plot this some other way?

    Many thanks

    (Defun c:ext (/)
    (setq sheetno (getstring "\nsheet number?: "))
    (setq dname (getvar "dwgname"))
    (setq dname1 (substr dname 1 (- (strlen dname) 4)))
    (setq dpref (getvar "dwgprefix"))
    (setq fname (strcat dpref dname1 "-sched-" sheetno))
    (setq pt1 (getpoint "\npick left hatd corner of sheet?: "))
    (setq ss1 (ssget))
    (command "-wblock" fname "" pt1 ss1 "")
    (command "OPEN" fname)
    (command "script" "plot_a3 pdf")
    )
     
    spencer1971, Jun 9, 2004
    #1
  2. spencer1971

    zeha Guest

    this command is available when sdi (single drawing interface)is set to 1
    when multiple drawings opened then it is no possible
    you can open with startapp and run acad.exe in sdi
     
    zeha, Jun 9, 2004
    #2
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.