Jump to content

Zoom Extents


roseanna

Recommended Posts

I have just started converting some VBA to .net. In my code I had put

 

Application.AcadApplicaton.ZoomExtents

 

and it was working. Yesterday I started adding new code and discovered that the ZoomExtents was no longer working. VS2008 doesn't give an error but the routine is no longer doing it's job. Does anyone have any suggestions?

 

Thanks

Rose Anna

Link to comment
Share on other sites

I don't really understand. I am running a .net program in debug mode. The de****** automatically opens a drawing, then I do netload and load the .dll, then I run a command that creates objects and adds to the document/transaction. After the command has run, I need to run zoom extents to get a full view of the drawing. The command can create the same drawing but different sizes for the objects. I did try to change the template I used to include ANSI standards and changing dimensions attribute but that shouldn't have anything to do with the zoomextents command ????

 

Dim acDoc As Document

acDoc = Application.DocumentManager.MdiActiveDocument

Dim acCurDb As Database

acCurDb = acDoc.Database

Using acTrans As Transaction = acCurDb.TransactionManager.StartTransaction()

Dim acBlkTbl As BlockTable

acBlkTbl = acTrans.GetObject(acCurDb.BlockTableId, OpenMode.ForRead)

Dim acModelSpace As BlockTableRecord

acModelSpace = acTrans.GetObject(acBlkTbl(BlockTableRecord.ModelSpace), OpenMode.ForWrite)

dim radCir = inputA

Dim acCirc1 As Circle = New Circle()

acCirc1 .SetDatabaseDefaults()

acModelSpace.AppendEntity(acCirc1 )

acTrans.AddNewlyCreatedDBObject(acCirc1 , True)

acCirc1 .Center = New Point3d(0, 0, 0)

acCirc1 .Radius = radCir

acTrans.Commit()

Application.AcadApplication.ZoomExtents() ''' This is the command that no longer works ????

End Using

Thanks

Link to comment
Share on other sites

How very interesting. My code is now working. I reset my autocad system to not use ANSI standards. Any insights??

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...