Thanks for the reply.
This is really important for me. Can you please give me an idea of how this can be done either with code block or python? I tried with the below code, but it’s not working. Please help me.
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.
dataEnteringNode = IN
aeccSurf = IN[0]
FilaPath = IN[1]
adoc = Application.DocumentManager.MdiActiveDocument
editor = adoc.Editor
civilDoc = CivilDocument.GetCivilDocument(adoc.Database)
aeccSurf = surf.InternalDBObject
Remove the current DEM file
aeccSurf.DEMFilesDefinition.RemoveAll()
Add the new DEM file
crs = civilDoc.Settings.DrawingSettings.UnitZoneSettings.CoordinateSystemCode
aeccSurf.DEMFilesDefinition.ADDDEMFile(filePath, crs, False, 0)
Save changes to the surface object
aeccSurf.DowngradeOpen()
aeccSurf.UpgradeOpen()
with aeccSurf.Database.TransactionManager.StartTransaction() as trans:
trans.Commit()
Assign your output to the OUT variable.
OUT = 0