Python - Corridor - use targets on the same side as the subassembly

In Python, how to Turn on and off the option of “Use targets on the same side as the subassembly” in corridor target mapping dialog for width and offset target (Civil 3D)?

I looked through the documentation, but I couldn’t find anything to do that.

https://help.autodesk.com/view/CIV3D/2021/ENU/?guid=22166b9d-b9e8-f5e3-1366-129b9f46e98b

Thanks

I have the same problem in C#. Did you find any solution for this?

Hi @tap28,
I have not yet found a solution for this.

Hi!
Thank you for the quick response. I will contact you if I find something.

I haven’t found a method or property exposing that in the .net API, nor do I see anything else available when using dir (see image above).

Looks like you’d need to develop your own function to replicate the behavior desired. There might be something exposed in the COM api but that’s also a challenge as there’s no formal documentation for it online.

The other issue is that the AppliedSubassembly class doesn’t have a property exposing what side of the baseline it is on. So you’d either have to include something like “Lt” or “Rt” in the name of the Subassembly or get the Side property from the Subassembly in the Assembly object. A naming convention for the Subassembly is probably a safer option.

I’d suggest SetTarget() within the BaselineRegion object. This article gives a nice breakdown of that and has helped clear things up for me in the past. Subassembly Targets (Having Fun Yet?) - Civilized Development

Good luck!

1 Like

Hello fellow scripters,
Can anyone give an update as to whether the above is available now with dynamo, or. Net api?

I am working on junction automation and most functionality seems to be OK apart from having to manually go through multiple junctions and turn off the above check box to get the targeting to work properly.

Any feedback now in mid 2024 would be great.

Regards,
cjm

It has been added to the API in the latest 2024.4 update.
https://help.autodesk.com/view/CIV3D/2024/ENU/?guid=GUID-E032EFF9-8D28-4E72-867A-A6558CC8E7B7

1 Like

Thanks for the feedback,
Any tips for how to get this to work using python? Anyone
cjm

Hi! @kovacsv @cjm @tzL6PRM

Did you find a way to make this work? I’ve been looking for a solution to this but haven’t found one yet :frowning_face:.

Thanks in advance!

Hi all,

There is a node available in Civil 3D 2025.1 for controlling this behavior.

2 Likes