Set data of profile 1 or profile 2 to profile view Band

Hello,
There are any way to set data of profile 1 and profile 2 of profile view band using dynamo , Python or C# ?

image

HI …TRY

You can read the property ProfileView.Bands.GetBottomBandItems() which is a ProfileViewBandItemCollection. Each ProfileViewBandItem in that collection has a Profile1Id and a Profile2Id property. You can set the value to the ObjectId of a Profile object.

Hi, I tried to set band set styles using Python in Dynamo for Civil 3D 2026. I was not successful. Is there any working solution please?

Setup: Civil 3D 2026.2.1, Dynamo 3.6.1, CPython3 engine.

Goal: On an existing profile view: set the profile view style, import a band set, then set Profile1 / Profile2 of the Profile Data bands to two design profiles (rim and invert).

Problem: The script runs without errors and Profile View Properties → Bands shows the correct settings (band set, Profile1/Profile2, Show Labels checked). But no band labels are drawn. After opening Profile View Properties and clicking Apply / OK, labels appear only in the first band. REGEN does not help.

What I tried (simplified)

# inside LockDocument + Transaction, pv = ProfileView opened ForWrite
pv.StyleId = view_style_id                      # profile view style
pv.Bands.ImportBandSetStyle(band_set_id)        # band set

bands = pv.Bands
items = bands.GetBottomBandItems()
e = items.GetEnumerator()
while e.MoveNext():
    band = e.Current
    if int(band.BandType) == 66:                # BandType.ProfileData
        band.Profile1Id = rim_profile_id
        band.Profile2Id = invert_profile_id
        band.ShowLabels = True
bands.SetBottomBandItems(items)
t.Commit()

I also tried: each step in its own transaction, writing bands one by one, re-applying SetVerticalGeometryPointsOptions, toggling the view style and MatchIncrementToGridIntervals, Editor.Regen(). Nothing helped.