Jump to content

Recommended Posts

Posted

Could someone please show me what I am doing wrong here?

 

I am trying to select all the objects in the drawing and place them in a selection set. However, the SelectByPolygon command requires a list of points (Variant) and the EXTMIN and EXTMAX are also variants. I cannot seem to create that list because it requires plugging an array into an array.

 

Can anyone see another way to do this?

 

   Dim oSS As AcadSelectionSet
   Dim arrPts As Variant
   Dim dblmin As Variant
   Dim dblmax As Variant

   dblmin = Application.ActiveDocument.GetVariable("EXTMIN")
   dblmax = Application.ActiveDocument.GetVariable("EXTMAX")

   arrPts(0) = dblmin
   arrPts(3) = dblmax

   Set oSS = Application.ActiveDocument.SelectionSets.Add("Plot")
   oSS.SelectByPolygon acSelectionSetCrossing, arrPts

   MsgBox oSS.Count

   Set oSS = Nothing

Posted

well I solved the question myself. :)

 

Sorry about the bogus thread.

 

 

Dim oSS As AcadSelectionSet
Dim dblmin As Variant
Dim dblmax As Variant

dblmin = Application.ActiveDocument.GetVariable("EXTMIN")
dblmax = Application.ActiveDocument.GetVariable("EXTMAX")

Set oSS = Application.ActiveDocument.SelectionSets.Add("Plot")
oSS.Select acSelectionSetAll, dblmin, dblmax

MsgBox oSS.Count

Set oSS = Nothing

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...