oldguy Posted October 21, 2009 Posted October 21, 2009 Does anyone know how to do this? following is my code, when I define cadDoc as AcadDocument, it works fine. Once I changed it to AxDbDocument it gave me errors. cadDoc.MSpace = True '<---- get error cadDoc.Application.ZoomExtents '<---- get error cadDoc.MSpace = False '<---- get error vp2.DisplayLocked = True Quote
ronjonp Posted October 21, 2009 Posted October 21, 2009 Does anyone know how to do this?following is my code, when I define cadDoc as AcadDocument, it works fine. Once I changed it to AxDbDocument it gave me errors. cadDoc.MSpace = True '<---- get error cadDoc.Application.ZoomExtents '<---- get error cadDoc.MSpace = False '<---- get error vp2.DisplayLocked = True I'm not a VBA'er but it looks like DBX docs don't support the zoom methods: ; IAxDbDocument: IAxDbDocument Interface; Property values: ; Application (RO) = Exception occurred ; Blocks (RO) = # ; Database (RO) = # ; Dictionaries (RO) = # ; DimStyles (RO) = # ; ElevationModelSpace = 0.0 ; ElevationPaperSpace = 0.0 ; FileDependencies (RO) = # ; Groups (RO) = # ; Layers (RO) = # ; Layouts (RO) = # ; Limits = (0.0 0.0 12.0 9.0) ; Linetypes (RO) = # ; Materials (RO) = # ; ModelSpace (RO) = # ; Name = "" ; PaperSpace (RO) = # ; PlotConfigurations (RO) = # ; Preferences (RO) = # ; RegisteredApplications (RO) = # ; SectionManager (RO) = Exception occurred ; SummaryInfo (RO) = # ; TextStyles (RO) = # ; UserCoordinateSystems (RO) = # ; Viewports (RO) = # ; Views (RO) = # ; Methods supported: ; CopyObjects (3) ; DxfIn (2) ; DxfOut (3) ; HandleToObject (1) ; ObjectIdToObject (1) ; Open (2) ; Save () ; SaveAs (2) Quote
oldguy Posted October 21, 2009 Author Posted October 21, 2009 thanks... Is there any other way to work around it? like change the viewport scale, stuff like that? The autoCAD marco is just too slow. we have 3000 drawings. so could take many days... Quote
ollie Posted November 5, 2009 Posted November 5, 2009 Spent the last hour or so looking through the object model for this without any luck, however, this information has to be stored in the document somewhere If we can find where this is stored and it isn't read only we can then scope each entity for the x and y extents of the document and use these to define the zoom factor I intend to do a bit more scouting when I get back home. Until then hopefully this will give some indication as to how this could be resolved. Good luck Ollie Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.