Thanks for code. I tried the code above.But when user is in the 'draftviewEdit' environment by 'DrawInView' command in popup.
How can I find which view is active/edited? How can I get object of view the user edited? There is no such property/method to find activeView or EditedView.
Can anybody help me?
Posted by: madhav dhamalePost date: 6/28/2009 8:14:45 PM
Dim oSE As SolidEdgeFramework.Application
Dim oDFT As SolidEdgeDraft.DraftDocument
Dim oSheet As Sheet
Dim oDvW As DrawingView
Dim sheetname As String
Set oSE = GetObject(, "solidedge.application")
Set oDFT = oSE.ActiveDocument
'The example must be run with a drawing view open "drawinview". If you cannot get this before the user closes the drawing view this will not work.
'So sheetname is the internal name of the sheet inside the drawing view.
sheetname = oDFT.ActiveSheet.Name 'You must get this name before the user closes the view.
'Search for the drawing view object that contains that sheet.
'For each sheet in the working sheets...
For Each oSheet In oDFT.Sections.WorkingSection.Sheets
'Search in the drawing views...
For Each dvw In oSheet.DrawingViews
If sheetname = dvw.Sheet.Name Then
'I found the sheet, so i have the drawing view.
Set myDrawingView = dvw
Posted by: Julian GuilloPost date: 7/7/2009 8:14:51 AM