Check for empty
CADForums.net Forum Index CADForums.net
Discussion of AutoCAD and other CAD software.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web cadforums.net
Check for empty

 
Post new topic   Reply to topic    CADForums.net Forum Index -> VBA
Author Message
anttam
Guest





Posted: Fri Apr 08, 2005 1:59 pm    Post subject: Check for empty Reply with quote

Q1. As I select a specific layer which is empty, how can I check
(1) the selection set, objSS is empty? Because objSS.count is unable to show the value.
(2) the layer is empty so that I will not perform the selection?

Back to top
Jürg Menzi
Guest





Posted: Fri Apr 08, 2005 3:32 pm    Post subject: Re: Check for empty Reply with quote

Hi anttam

Quote:
(1) the selection set, objSS is empty? Because objSS.count is unable to
show the value.
If you create a named selection set you've always a count property:

Code:

Public Function MeSelectionSet(SetNme As String) As AcadSelectionSet

  On Error Resume Next
 
  With ThisDrawing.SelectionSets
    Set MeSelectionSet = .Add(SetNme)
    If Err.Number <> 0 Then
      Err.Clear
      .Item(SetNme).Delete
      Set MeSelectionSet = .Add(SetNme)
    End If
  End With
 
End Function


Quote:
(2) the layer is empty so that I will not perform the selection?
Check GenerateUsageData method (A2k5+)


Cheers
--
Juerg Menzi
MENZI ENGINEERING GmbH, Switzerland
http://www.menziengineering.ch
Back to top
 
Post new topic   Reply to topic    CADForums.net Forum Index -> VBA All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server DSP VoIP Electronics New Topics
Powered by phpBB