How can I reach 3D object's volume with solidselection?

How can I reach 3D object's volume with solidselection?

Anonymous
Not applicable
405 Views
1 Reply
Message 1 of 2

How can I reach 3D object's volume with solidselection?

Anonymous
Not applicable

Hi.

 

I can use SolidSelection.Item  for 3D object's handles and but I can't take 3D object's volumes with SolidSelection.

 

Then I can put object 's handles(1EE) to a collection. 

 

Can I use SolidSelection to keep my 3D volumes values?

 

All sub-structure of my program works with SolidSelection Object.

 

Volume Codes;

 

For Each tEnt In ThisDrawing.ModelSpace
        If TypeOf tEnt Is Acad3DSolid Then
            Dim tEntSolid As Acad3DSolid
            Set tEntSolid = tEnt
            tmpVols1.Add (tEntSolid.Handle & "/" & tEntSolid.Volume)
        End If
    Next

 

I can't match with returned result of  these codes and SolidSelection.item(i)

 


 

For Each tEnt In ThisDrawing.ModelSpace
        If TypeOf tEnt Is Acad3DSolid Then
            Dim tEntSolid As Acad3DSolid
            Set tEntSolid = tEnt
            tmpVols1.Add (tEntSolid.Handle & "/" & tEntSolid.Volume)
        End If
    Next
    
    Dim i As Integer
    Dim strVolume As Double
    
    For i = 0 To lstResults.ListCount - 1
        If (Split(tmpVols1.Item(i), "/")(0) = Split(Split(tmpVols1.Item(i), "/")(1), "-")(0)) Then
            sList.Add (Split(tmpVols1.Item(i), "/")(0))
        End If
    Next

 

 

Thanks for helps...

 

  

 


0 Likes
406 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable

Thanks everybody. 🙂 I found the problem that collection's start value is "1" , it must be "0" .

 

 

0 Likes