Selecting objects in viewports....

Selecting objects in viewports....

Anonymous
Not applicable
400 Views
2 Replies
Message 1 of 3

Selecting objects in viewports....

Anonymous
Not applicable
I am trying to figure out a way for the user to switch to different
viewports and select objects in the modelspace through them. I want to
select only Mtext and TExt entities (filtering). When my program runs I
want to pause and allow the user to seelct the mtext entities/text I
want them to be able to switch to multiple viewports and select objects
through those. I tried to use SelctonScreen, but as soon as I switch
to a viewport the command ends.

thanks
--

-------------------
Nauman M
CAD Bazaar
0 Likes
401 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
I figured out how to do selection sets,

2 questions :
1. how do I specify multiple type 0 objects, in lisp you would just list
them in with the 0 . "1","2" etc)
2. how can the user switch space while selecting objects through
viewport. I guess this is not achievable, so how can I switch to model
space zoom extents and then let the user select the objects, then switch
back to paperspace.
thanks




Dim ASel As AcadSelectionSet
Dim FilterType(0) As Integer
Dim FilterData(0) As Variant


FilterType(0) = 0
FilterData(0) = "MTEXT"
' FilterType(1) = 0
' FilterData(1) = "TEXT"

Err.Clear
On Error Resume Next
Set ASel = ThisDrawing.SelectionSets("Inserts")
If Err.Number <> 0 Then
Set ASel = ThisDrawing.SelectionSets.Add("Inserts")
End If

Pnt = ThisDrawing.GetVariable("viewctr")
ZHgt = ThisDrawing.GetVariable("viewsize")
VTwist = ThisDrawing.GetVariable("viewtwist")

ASel.Clear

ThisDrawing.Utility.Prompt vbNewLine & "Select all the objbects for
this sheet using window, relavant objects will be filtered
automatically"
ASel.SelectOnScreen FilterType, FilterData


Nauman M wrote:
>
> I am trying to figure out a way for the user to switch to different
> viewports and select objects in the modelspace through them. I want to
> select only Mtext and TExt entities (filtering). When my program runs I
> want to pause and allow the user to seelct the mtext entities/text I
> want them to be able to switch to multiple viewports and select objects
> through those. I tried to use SelctonScreen, but as soon as I switch
> to a viewport the command ends.
>
> thanks
> --
>
> -------------------
> Nauman M
> CAD Bazaar

--

-------------------
Nauman M
CAD Bazaar
*********NEW*********
Add AEC Objects to the Layers(lkey) you want, not the Layers ADT Wants!!
Add a Wall directly on the DEMO Layerkey, instead of switching it later.
Download the eval at http://www.cadbazaar.com
*********NEW*********
Need to easily Navigate to your Custom Content Folders?
Need Autolayering for Dimensions without going through Design Center?
Download the ADT Tools for ADT 2 & 3 at
http://www.cadbazaar.com
0 Likes
Message 3 of 3

Anonymous
Not applicable
"Nauman M" wrote ...
> how can I switch to model
> space zoom extents and then let the user select the objects, then switch
> back to paperspace.

Not that this helps you, but I've been wanting to do something like this
now, too. We've started putting drawing content in MS, and annotations in
PS. One complication is when we want to move something in either space, the
objects in the other space have to be moved by the scaled distance...

I'd like to find or write a command that would let me pick a selection
window in PS, and then do 2 moves -- first the PS annotations and then the
MS objects (automatically adjusted for viewport scale). I'll let the list
know if I actually get started on this.

James
0 Likes