Forums:
Hi,
I have made one block in part and then created view of that part in drawing.
Now I am trying to get co-ordinates value with respect to that particular view when user will select screen position in that view.
I am able to get point co-ordinates with respect to drawing.
By using below code i am able to get origin of activated view.
Module Module1 Dim theSession As Session = Session.GetSession()Dim workPart As Part = theSession.Parts.WorkDim theUI As UI = UI.GetUI Sub Main() Dim X, Xx, Y, Z AsDouble If IsNothing(theSession.Parts.Work)Then'active part requiredReturnEndIf Dim dwgsheet As Drawings.DrawingSheet dwgsheet = workPart.DrawingSheets.CurrentDrawingSheet ForEach View As Drawings.DraftingViewIn dwgsheet.SheetDraftingViewsIf View.IsActiveForSketching=TrueThen X = View.AbsoluteOrigin.X Y = View.AbsoluteOrigin.Y Z = View.AbsoluteOrigin.Z' MsgBox(CStr(X))MsgBox(CStr(Xx))EndIf NextEndSub EndModule