Hi
I have a drawing with about 73 named views.
I am working on some code here;
With some help (Thanks Bob!)
This part is working well
For Each Ent In Sset
If TypeOf Ent Is AcadBlockReference Then
Set BlkRef = Ent
strName = BlkRef.Name
ThisDrawing.SendCommand "MSLIDE c:\tempslide\" & strName & vbCr
'*****MAKE SURE THE ABOVE FOLDER EXISTS*****
End If
Next Ent
And all it is doing is grabbing each blkref (1 per view) in the drawing and making a slide for each one, using the blkfef.name as the slide name
However, I want to be able to grab the lower left and upper right points of each view in the drawing as the pick points for each slide. I have the below code written, I am getting prompted for each point, the view is getting zoomed to window which is critical for this but I can not get the views to be recognized as an entity type in the sset or I am likely doing something wrong.
The other problem I am having is that by using the for each loop, I am ending up with a slide show.
All I want to do is to be prompted for each view, pick my points, then have the code assign the blockref name for that view as the name of each slide, then return the view back to the previous view and prompt for the next selection.
Also, with the views, each one needs to be restored (-view, r etc) in order for the frozen (views) layer state to be used.
Hope this makes sense?
Thanks!
M
Dim NView As AcadView
Dim Sset As AcadSelectionSet
Dim Ent As AcadEntity
Dim Pnt1 As Variant
Dim Pnt2 As Variant
Pnt1 = ThisDrawing.Utility.GetPoint(, "Pick First Point")
Pnt2 = ThisDrawing.Utility.GetPoint(, "Pick Second Point")
Set Sset = ThisDrawing.SelectionSets.Add("Sset")
Sset.Select acSelectionSetWindow, Pnt1, Pnt2
ZoomWindow Pnt1, Pnt2
For Each Ent In Sset
If TypeOf Ent Is AcadView Then
strName = NView.Name
ThisDrawing.SendCommand "-view" & vbCr & "r" & vbCr & strName & vbCr
End If
Next Ent