.NET

Reply
*Nate Hunter
Message 1 of 2 (124 Views)

Viewport Scale

124 Views, 1 Replies
10-02-2006 09:09 AM
I need to pull the scale of a viewport that the user is already in. How can
I do this.? Th

Thanks in advance
*Paul Richardson
Message 2 of 2 (124 Views)

Re: Viewport Scale

10-02-2006 05:11 PM in reply to: *Nate Hunter
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

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community