Hi, could you please advise me if it is already possible to create a property set definition with a property definition that is of type automatic, such as Volume for 3D solids. I tried creating a property definition volume manually and then copying it to property set definitions, but the property definition value copied in this way was then not showing up in the exported IFC files.
Hi…did you apply or add this property set to elements already drawn in your file?
Hi @alaasaid_10, thank you for respons. I can use Dynamo for property set definition creation also to apply them to 3D Solids (in style manager or to created objects in model space). I only need to create automatic property definitions in property set definitions using Dynamo.
ok, I understood your point, I think you will find your answer in this video Dynamo for Civil 3D - Property Sets samples | Civil 3D 2020 | Autodesk Knowledge Network
you can also check this discussion
Civil3d Property sets with dynamo - #13 by rhodri.lea
Also there is a useful package that can help you in creating property set definitions using Dynamo called “Civil3DToolkit”.
Thank you for mentioning Property set samples. I hope this part of code from @Paolo_Emilio_Serra1 can help me.
for jpd in jpsd.Definitions:
pd = PropertyDefinition()
pd.Automatic = jpd.Automatic
pd.DataType = DataType.Parse(DataType, jpd.DataType, True)
pd.Description = jpd.Description
pd.Name = jpd.Name
if not definitions.Contains(pd):
definitions.Add(pd)
Hi, I found this Defining a property set definition in .NET - AEC DevBlog
I was not successful with Python. Is here anyone who has code in Python?
Import the Civil 3D API
import Autodesk.Civil.DatabaseServices as c3d
Get the current Civil 3D document
doc = c3d.Document.GetCurrent()
Create a new property definition in the current Civil 3D model
propDef = doc.PropertyDefinitions.Create(“MyVolumeDefinition”)
Set the property definition to be automatic
propDef.IsAutomatic = True
Set the property definition to calculate the volume of a solid 3D object
propDef.SetProperties({“CalculationMethod”: c3d.DB.AutomaticPropertyCalculationMethod.Volume})
Save the changes to the property definition
propDef.Save()