Volume dashboard data in dynamo

Hello guys!

I’m not so expert in civil 3D (far from that) however I’m trying to manipulate property sets in dynamo, so in that way I can export data in an IFC file, my question is if there is a way to get valeus from volume dashboard in dynamo, so then I can set properties in extend data to export in the IFC.

I am not sure if that data is available.

In the next version of Arkance Systems Node Library there will be a node for bounded volumes calculation, so you can mimic the volume dashboard.

1 Like

You can use:

.GetVolumeProperties()

on a database object, volume surface, in a python node. See my post here:

You can get the numeric values and assign them to property sets for your export. If you need any assistance and are willing to share any files I’d be happy to help.

I’m trying to use this pyhton in many surfaces at same time, however a error occurs, does this happens because this python just runs one surface per time?

What is the error?
If it is telling you the list has no attributes named … You have to loop through the input surfaces.

Sorry it was only set up for a single volume surface. Here is a solution for all surfaces with a name containing an input string.


VolumeSurface.dyn (15.1 KB)

# Load the Python Standard and DesignScript Libraries
import sys
import clr

# Add Assemblies for AutoCAD and Civil3D
clr.AddReference('AcMgd')
clr.AddReference('AcCoreMgd')
clr.AddReference('AcDbMgd')
clr.AddReference('AecBaseMgd')
clr.AddReference('AecPropDataMgd')
clr.AddReference('AeccDbMgd')

# Import references from AutoCAD
from Autodesk.AutoCAD.Runtime import *
from Autodesk.AutoCAD.ApplicationServices import *
from Autodesk.AutoCAD.EditorInput import *
from Autodesk.AutoCAD.DatabaseServices import *
from Autodesk.AutoCAD.Geometry import *

# Import references from Civil3D
from Autodesk.Civil.ApplicationServices import *
from Autodesk.Civil.DatabaseServices import *

# The inputs to this node will be stored as a list in the IN variables.
vs_name = IN[0]
volumeSurfaces = []
volumeSurfaceNames = []
adjustedCutVolumes = []
adjustedFillVolumes = []
adjustedNetVolumes = []

adoc = Application.DocumentManager.MdiActiveDocument
editor = adoc.Editor

with adoc.LockDocument():
    with adoc.Database as db:

        with db.TransactionManager.StartTransaction() as t:
            bt = t.GetObject(db.BlockTableId, OpenMode.ForWrite)
            btrID = bt.get_Item("*Model_Space")
            btr = t.GetObject(btrID, OpenMode.ForWrite)
            
            for oid in btr:
                obj = t.GetObject(oid, OpenMode.ForWrite)
                
                if isinstance(obj, TinVolumeSurface) and vs_name.lower() in obj.Name.lower():
                    volumeSurface = obj
                    volumeSurfaces.append(volumeSurface)
                    volumeSurfaceNames.append(volumeSurface.Name)
            
            for volumeSurface in volumeSurfaces:
            	props = volumeSurface.GetVolumeProperties()
            	
            	adjustedCutVolume = props.AdjustedCutVolume
            	adjustedCutVolumes.append(adjustedCutVolume)
            	
            	adjustedFillVolume = props.AdjustedFillVolume
            	adjustedFillVolumes.append(adjustedFillVolume)
            	
            	adjustedNetVolume = props.AdjustedNetVolume
            	adjustedNetVolumes.append(adjustedNetVolume)
            
                    
            
            # 
            #

            # Commit before end transaction
            t.Commit()
            pass

# Assign your output to the OUT variable.
OUT = volumeSurfaceNames, adjustedCutVolumes, adjustedFillVolumes, adjustedNetVolumes

4 Likes

Update: there are nodes for this in the Camber package starting in v4.0.0.

1 Like

Which Civil3D/Dynamo version do i need for this package?

2023
2022.1 or 2022.1.1
2021.3
2020.6 or 2020.6.1