VBA
Discuss AutoCAD ActiveX and VBA (Visual Basic for Applications) questions here.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

1 REPLY 1
Reply
Message 1 of 2
ozkan_0712
309 Views, 1 Reply

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

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...

 

  

 


1 REPLY 1
Message 2 of 2
ozkan_0712
in reply to: ozkan_0712

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

 

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost