Viewbase not generating drawings correctly

Viewbase not generating drawings correctly

chris_swetcky
Observer Observer
1,307 Views
2 Replies
Message 1 of 3

Viewbase not generating drawings correctly

chris_swetcky
Observer
Observer

I use viewbase all of the time and haven't had any problems in 2017. Today however I went to plate a rather simple drawing and when I ran the viewbase command it did not generate correctly at all, it is missing objects that were selected and different objects are being generated in different views (aka something in the base view is not showing up in the side view or something in the top view is not showing up in the top view etc.). I have no idea why this is happening anyone have any thoughts? File is attached.

0 Likes
Accepted solutions (1)
1,308 Views
2 Replies
Replies (2)
Message 2 of 3

john.vellek
Alumni
Alumni
Accepted solution

Hi @chris_swetcky

 

This is a known bug but a Community clever user posted this workaround which appears to work properly for me.

 

  • Turn OFF all used layers.
  • Update the views .
  • Then turn on one layer.  The missing parts should now show up in the updated view. 
  • Repeat for as many layers as you have used

Please hit the Accept as Solution button if my post fully solves your issue or answers your question.


John Vellek


Join the Autodesk Customer Council - Interact with developers, provide feedback on current and future software releases, and beta test the latest software!

Autodesk Knowledge Network | Autodesk Account | Product Feedback
0 Likes
Message 3 of 3

elshawadfy
Collaborator
Collaborator

Hi @chris_swetcky,

 

I created a lisp file that automates the workaround proposed by @cbuli @john.vellek 

 

Hope it helps all those suffering the same issue.. 🙂

(Tell me if any thing went wrong)

 

The lisp does the following:

- saves the current layer state..

- turns off all layers..

- Updates all viewports..

- For every layer:

     - Freezes and offs every other layer..

     - Updates all viewports

     - Moves to the next layer

After finishing: It restores the layer state and removes it from saved layer states

 

+  Some error handling..

 

 

;;; 
;;; 
;;; 
;;; 
;;; This file was created by El-Shawadify to address an issue reported by Autodesk Community Members about ViewBase Command..
;;; The essue appears when opening a drawing that contains ViewBase ViewPorts, created in a different release of AutoCAD..
;;; Some of the objects disappear..
;;; 
;;; The issue was reported several times, icluding the ones mentioned in these threads:
;;; http://forums.autodesk.com/t5/autocad-2013-2014-2015-2016-2017/acad-2017-viewbase-error/td-p/6241719/page/2
;;; http://forums.autodesk.com/t5/autocad-2013-2014-2015-2016-2017/viewbase-not-generating-drawings-correctly/td-p/6401401
;;; 
;;; According to @cbuli @John Vellek in that thread:
;;; "This is a known bug but a Community clever user posted this workaround which appears to work properly for me.
;;; ---- Turn OFF all used layers.
;;; ---- Update the views .
;;; ---- Then turn on one layer.  The missing parts should now show up in the updated view. 
;;; ---- Repeat for as many layers as you have used"
;;; 
;;; 
;;; The purpose of this LISP now is to Automate this process for those suffering from the same essue 
;;; 
;;; 
;;;
;;; ==============================================================================================================================
;;; You may use, distribute, modify this file  - as long as you keep this header at the beginning..
;;; 
;;; Regards,
;;; El-Shawadify
;;; 
;;; June 24th, 2016
;;; 
;;; My Profile On AutoDesk Community Forum:
;;; http://forums.autodesk.com/t5/user/viewprofilepage/user-id/2780584
;;; The slution that I automated was originally proposed by @cbuli in Auodesk Community..
;;; His profile page in the community: 
;;; http://forums.autodesk.com/t5/user/viewprofilepage/user-id/3750495 
;;; - Thank you very much @cbuli..
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
;====================================================================== Main Defun
;
(defun C:VBUP(/ CurLayerProps CurLayerName 
                *error* msg OriginalErr Err
             ); 
;
;====================================================================== Error Fuctions
;
(setq OriginalErr *error*)
(defun Err ( DimModErr)
   (command-s "-layer" "a" "r" "BeforeVBUpdate" "d" "BeforeVBUpdate" "" "")
   (command-s "undo" "end")
   (setvar "CMDECHO" 1)
   (princ (strcat "\nError: " DimModErr " The command was interrupted while Updating ViewBase ViewPorts, some elements may still be missing.."))
   (setq *error* OriginalErr)
)
(Setq *error* Err)
;
;
;
;====================================================================== Command Main Body
;
(Command "Undo" "Begin")
(setvar "CMDECHO" 0) 
(command "-layer" "a" "s" "BeforeVBUpdate" "" "" "")
(command "-layer" "off" "*" "y" "")
(command "ViewUpdate" "all")
;
;
(setq CurLayerProps (tblnext "LAYER" t))
(while CurLayerProps 
   (setq CurLayerName (cdr (cadr CurLayerProps))) 
   (command "-layer" "t" CurLayerName "on" CurLayerName "s" CurLayerName "f" "*" "off" "*" "y" "")
   (command "-layer" "on" CurLayerName "" "regen")
   (command "ViewUpdate" "all")
   (setq CurLayerProps (tblnext "LAYER"))
)
;====================================================================== Revert Env. Changes
;
   (command "-layer" "a" "r" "BeforeVBUpdate" "d" "BeforeVBUpdate" "" "")
   (setvar "CMDECHO" 1)
   (command "undo" "end")
   (setq *error* OriginalErr)
);
;====================================================================== Command End

 

Lisp Attached..

 

Enjoy 🙂

 

Regards..

 

 

0 Likes