Results 1 to 3 of 3

Thread: Make an open drawing visible in the drawing editor

  1. #1
    Login to Give a bone
    0

    Default Make an open drawing visible in the drawing editor

    Hi

    I've managed to open a drawing without loading it into the drawing editor using Visual Lisp:

    Code:
    	  ;; Create a unbound drawing object
    	  (setq	objDWG
    		 (vla-GetInterfaceObject
    		   (vlax-Get-Acad-Object)
    		   (strcat
    		     "ObjectDBX.AxDbDocument."
    		     (substr (getvar "AcadVer") 1 2)
    		   )
    		 )
    	  )
    
    	  ;; Open the drawing and bind it to our object
    	  (setq	errObj (vl-catch-all-apply
    			 'vla-Open
    			 (list objDWG
    			       (cond (tmpFile)
    				     (FullNameAndPath)
    			       )
    			       (if optOpenReadOnly
    				 :vlax-true
    				 :vlax-false
    			       )
    			 )
    		       )
    	  )

    Now that the drawing is open, is there a way to load it into the drawing editor and make it visible? I'm processing the drawing first before allowing the user to see it.
    Last edited by Opie; 2011-02-08 at 06:51 PM. Reason: [code] tags added

  2. #2
    100 Club
    Join Date
    2000-11
    Location
    Ontario, Canada
    Posts
    116
    Login to Give a bone
    0

    Default Re: Make an open drawing visible in the drawing editor

    While the drawing is still open in ObjectDBX, you can only open it as "read only" in the drawing editor. You will need to use vla-saveas to save your changes in ODBX, then close it in that interface (vlax-release-object objDWG). You can then open the drawing in the editor;

    (vla-activate (vla-open (vla-get-documents (vlax-get-acad-object)) (FullNameAndPath)))

  3. #3
    Login to Give a bone
    0

    Default Re: Make an open drawing visible in the drawing editor

    Thanks! You've been very helpful.

Similar Threads

  1. Replies: 10
    Last Post: 2023-01-24, 06:27 PM
  2. Replies: 2
    Last Post: 2011-02-10, 01:11 AM
  3. ...drawing contains authoring elements. Open in block editor?
    By pmedina in forum Dynamic Blocks - Technical
    Replies: 3
    Last Post: 2008-09-28, 09:08 AM
  4. Replies: 2
    Last Post: 2006-05-10, 06:38 PM
  5. Replies: 2
    Last Post: 2006-05-02, 04:41 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •