In AutoCAD Civil 3D's Toolspace -> Settings Tabs when you expand the collection items under Alignment, you would see a set of object collection like the Alignment Styles, Design Checks, Label styles etc. Under the Design Checks collection you would see objects like "Design Check Sets", "Line", "Curve", "Spiral" etc. You intend to add a new Line Design Check item with a custom Expression or a new Curve Design Check item with a custom Expression / Formula.
The trick of adding a new Design Checks is exploring the AlignmentDesignCheckRoot Object.
Here is a VB.NET code snippet which demonstrates how to add new Alignment Design Checks using Civil 3D .NET API.
Using db As Database = HostApplicationServices.WorkingDatabase
Using trans As Transaction = db.TransactionManager.StartTransaction
' AlignmentDesignCheckRoot
Dim oAlignmentDesignCheckRoot As AlignmentDesignCheckRoot =
New AlignmentDesignCheckRoot(Autodesk.AutoCAD.DatabaseServices.HostApplicationServices.WorkingDatabase)
' Add CurveDesignChecks
oAlignmentDesignCheckRoot.CurveDesignChecks.Add("MY_TEST_Curve", "Created using API", "Radius>200")
' Add LineDesignChecks
oAlignmentDesignCheckRoot.LineDesignChecks.Add("MY_TEST_Line", "Created using API", "{Design Speed}<=65")
' SpiralDesignChecks
oAlignmentDesignCheckRoot.SpiralDesignChecks.Add("MY_TEST_Spiral", "Created using API", "A<=100.05")
trans.Commit()
End Using
End Using
And the result of running the above code snippet –
Hope this is useful to you !