PDA

View Full Version : How can I tell if I am in Modelspace or Paperspace



bweir
2006-11-16, 05:59 PM
How can I tell if I am in Modelspace or Paperspace. There's the TILEMODE that I can read but this does me no good if I'm in a viewport in paperspace. If I'm in a viewport I'm really in model am I not but the Thisdrawing.Activespace returns 0 (acPaperSpace) when I'm in a viewport or in the layout. What can I check to see if my layout is active or if a viewport is active?

Ed Jobe
2006-11-16, 06:41 PM
You're in a forrest and trees scenario. There isn't just one thing you can check, you need to check both.



Check1: 'first check for tilemode = 0
If ThisDrawing.ActiveSpace = acPaperSpace Then
Check2: 'then make sure ms is active
If ThisDrawing.MSpace = True Then
'do your stuff
End If
End if

bweir
2006-11-16, 06:49 PM
Thanks, I just found the solution as well.