We have a CADmep model inside AutoCAD 2018 where the pipe coordinates are a large distance from the origin (X=2.52970E+06, Y=8.69056E+06). The view we have saved for the model in AutoCAD CADmep centers all the pipes on screen, but when the model is opened in the viewer, all that is seen is a speck on the screen off to the corner. How do I force the viewer to use the same view as in AutoCAD?
Asked
Active
Viewed 24 times
1 Answers
1
Unfortunately the AutoCAD views do not get saved when extracting the model for the viewer.
You could use the AutoCAD API to get the view information and save it to a custom database either by using a desktop plugin running in AutoCAD or through the Design Automation API, then set that view in the Viewer upon loading of the model.
Another suggestion would be to programmatically compute an appropriate view when loading the model directly using Viewer API, using bounding boxes for example.
The model should appear in the Viewer with its geometry centred, maybe there is an element in your model away from the rest of the pipes that causes it to display this way...
Hope this helps

Felipe
- 4,325
- 1
- 14
- 19
-
When in full-screen mode, the "F" key will fit the view. Maybe this is what we are looking for. – JGeerWM Dec 20 '17 at 20:57
-
After GEOMETRY_LOADED_EVENT has been fired you can try to use viewer.fitToView() which should have the same effect ... – Felipe Dec 20 '17 at 23:52