Visual Basic Customization

Visual Basic Customization

Reply
Contributor
ozkan_0712
Posts: 19
Registered: ‎03-18-2012
Message 1 of 2 (110 Views)

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

110 Views, 1 Replies
04-28-2012 11:08 AM

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

 

  

 


Contributor
ozkan_0712
Posts: 19
Registered: ‎03-18-2012
Message 2 of 2 (92 Views)

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

04-29-2012 06:06 AM in reply to: ozkan_0712

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

 

 

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.