.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Viewport Scale

1 REPLY 1
Reply
Message 1 of 2
Anonymous
292 Views, 1 Reply

Viewport Scale

I need to pull the scale of a viewport that the user is already in. How can
I do this.? Th

Thanks in advance
1 REPLY 1
Message 2 of 2
Anonymous
in reply to: Anonymous

Try this.

[CommandMethod("CvportScale")]
public void CurrentVportScale()
{
Editor ed = Application.DocumentManager.MdiActiveDocument.Editor;
ObjectId vpid = ed.CurrentViewportObjectId;
using (Transaction tr =
ed.Document.TransactionManager.StartTransaction())
{
Viewport vport = (Viewport)tr.GetObject(vpid, OpenMode.ForRead);
ed.WriteMessage(vport.CustomScale.ToString());

}
}

"Nate Hunter" wrote in message
news:5347486@discussion.autodesk.com...
I need to pull the scale of a viewport that the user is already in. How can
I do this.? Th

Thanks in advance

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost