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.


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.

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