Copy and Paste between windows instances

Hi

We have one guy who likes to have multiple instances of Bricscad open instead of multiple windows in the same bricscad session.  He does this by setting SDI to on.  When he tries to copy and paste between the two instances he gets the following message. 

not open for write


Comments

  • Wouldn't that be more demanding on resources, apart from being very little advantage with possible other consequences like this one?
  • I do a separate instance of Bricscad for each drawing I have open.  Resources don't seem to be a problem.  My main reason for doing so is that I get interrupted frequently and have to open files for reference.  Habit at the end of a call is to click on the X in the upper right.  Not a good thing to do.  Multiple instances mean I don't throw away work if I hit the wrong X.

    I haven't seen that SDI does much in Bricscad.  I use this in on_doc_load.lsp to assure that only one file is open in each instance of Bricscad:
    [code](setvar "cmdecho" 0)

    (command "undefine" "open")

    (defun MsgBox (strPrompt strTitle lngFlags intTimeout / app rVal)
      (setq app (vlax-create-object "WScript.Shell"))
      (setq rVal (vlax-invoke app 'Popup strPrompt intTimeout strTitle lngFlags))
      (vlax-release-object app)
      rVal
    )

    (defun c:open ( / item name new_file)
      (vlax-for item (vla-get-documents (vlax-get-acad-object))                              ; for all open drawings..  .
        (if (or (= (getvar "dbmod") 0)                                                       ; has drawing been modified?
                (= (vla-get-saved item) :vlax-true)                                          ; has drawing been saved?
            )
          (vla-close item :vlax-false)                                                       ; automatic close if not modified
          (progn                                                                             ; drawings has been modified...
            (setq name (vla-get-fullname item))                                              ; get the drawing's name
            (if (= name "")                                                                  ; if drawing has not been nemed...
              (setq name "Drawing1.dwg")                                                     ; name it
            )
            (vla-activate item)                                                              ; make drawing current
            (setq val (msgbox (strcat "Save changes to " name " ?") "Bricscad" 35 0))        ; show save box
            (cond ((= val 2)
                    (exit)
                  )
                  ((= val 6)
                    (vla-close item :vlax-true)                                              ; save and close
                  )
                  (t
                    (vla-close item :vlax-false)                                             ; close, no save
                  )
            )
          )
        )
      )
      (setq new_file (getfiled "Open Drawing" "" "dwg" 16))                                  ; call file open dialog
      (if (vl-file-rename new_file new_file)
        (vla-activate                                                                        ; open and activate the new drawing
          (vla-open (vla-get-documents (vlax-get-acad-object)) new_file)
        )
        (progn
          (setq val (msgbox                                                                  ; show save box
                      (strcat "File " new_file " is already open. Open as Read Only?")
                      "Bricscad"
                      35
                      0
                    )
          )
          (if (= val 6)
            (vla-activate                                                                    ; open and activate the new drawing
              (vla-open (vla-get-documents (vlax-get-acad-object)) new_file :vlax-true)
            )
          )
        )
      )
      (princ)
    )
    [/code]
    I haven't seen any problems doing copy/paste between drawings with the approach I use.
  • @ Doug:
    I wonder if the problem is really related to multiple instances. Is there no problem is copy+paste is performed between drawings in the same BricsCAD instance?
  •  Hi Roy

    No if you open multiple drawings in the save cad session there is no problem. 
This discussion has been closed.