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