Hi everyone,
I am facing a persistent issue using the Civil3DToolkit (v1.1.28) to add PVIs to a profile.
The Setup:
-
I am creating a profile using AlignmentExtensions.AddProfileByName.
-
I am calculating station and elevation values.
-
I am passing these to ProfileExtensions.
AddPVI.
The Problem: Even though the Station and Elevation inputs are showing valid double values in my Watch nodes, the AddPVI node returns null and throws the warning: “Null value cannot be cast to type”.
Which version of Civil 3D are you in?
One guess as to what you’re fighting here is that you’re in an unsupported build (pretty much all supported versions at this point) for Civil 3D toolkit and have stumbled onto a tool which needs an update that won’t come.
Thanks for the heads-up. I am using Civil 3D 2024. If the Civil3DToolkit is considered unstable or unsupported for this version, could you please point me toward a more reliable alternative for adding PVIs to profiles? I am looking for a solution that is actively maintained and compatible with the 2024 API.
Shouldn’t have an issue with 2024. Note that you’re into the last 10 months of support for 2024, and it’s a near certainty that the easy path forward for 2024 won’t work in a future build (and the further out you go the less likely to work) so it might be worth updating soon.
Can you reproduce the issue with a simple dataset and post the graph and DWG to reproduce?