Subassembly Composer - Are Conditionals Subs Possible?

Subassembly Composer - Are Conditionals Subs Possible?

cory.honeyman
Explorer Explorer
804 Views
5 Replies
Message 1 of 6

Subassembly Composer - Are Conditionals Subs Possible?

cory.honeyman
Explorer
Explorer

I am trying to create a conditional subassembly in composer that will allow two different sets of subs based on whether a surface exists in that section or not.

 

The stock ConditionalCutFill sub can be used for when the surface is found, but it doesn't work for when the surface is not found.

 

When I try to build this in composer, it always adds any subassemblys attached to it regardless of if the condition is met. In the assembly properties, it does not show the attached subs correctly nested as it should for a conditional.

 

I tried to manually edit the atc file to add the 

<ConditionalSubassembly>true</ConditionalSubassembly>

as per this post: https://forums.autodesk.com/t5/civil-3d-customization-forum/conditional-subassembly-visual-basic-bra...

 

However, it is still not working.

 

Is it possible to make conditional subs with composer?

0 Likes
805 Views
5 Replies
Replies (5)
Message 2 of 6

dkennedy
Advocate
Advocate

Yes, there are conditional tools in sub assembly composer, and there are downloadable examples.

dkennedy_0-1760127801452.png

 

But this is more easily achievable with a more modularized corridor. can you post a pic of your corridor assembly?

0 Likes
Message 3 of 6

cory.honeyman
Explorer
Explorer

Sorry, I will try to clarify.

The issue is that when using these decision blocks these to try to create a conditional subassembly similar to the stock conditionals (such as the "ConditionalCutFill"), it does not work to create nested subassembly sets, and thus I cannot seem to create a conditional from composer.

 

Here is an assembly in my testing file. I have the stock conditionals, one for cut and one for fill. You can see that the attached subs are correctly nested. Below (highlighted) is my test conditional from composer. Attached to that sub is the one I called "ShouldBeNested" but it is not correctly nested. Thus, when it builds, it always adds the "ShouldBeNested" subassembly in the corridor regardless of if the conditional, while the stock conditionals work correctly (only building the nested subs when the condition is met).

coryhoneyman_0-1760129052635.png

coryhoneyman_1-1760129291773.png

 

 

I have modified my composer subassembly down to the bare minimum to try to diagnose the issue. But my ultimate goal was to create a sub that can build a different set of subs depending on whether a surface exists in that section or not, such as a rock surface that is only in one area. The stock subs will build the nested subs if they are cut or fill, but if they can't find the surface at all, they won't build. So I need to create a sub that can do that.

 

0 Likes
Message 4 of 6

dkennedy
Advocate
Advocate

Post a snippet of your SAC FlowChart.

 

Also the "stock" sub assembly is .net based

0 Likes
Message 5 of 6

cory.honeyman
Explorer
Explorer

Here is a stripped down pkt just trying test how to get this to work. (rename to remove .zip since it won't let me upload a .pkt for some reason)

 

The basic test is a decision block testing for "TargetSurface.IsValid".

 

However, I also added a auxiliary link to the target surface, and then test if that link has an intersect to also test if the surface is present at that section. However, it still always places any other subassemblys regardless, thus not working as a conditional sub. 

 

Also, I modified the atc file to have the <ConditionalSubassembly>true</ConditionalSubassembly> tag.

 

Are conditional subassemblys even possible to make in Composer?

I know the stock subs are coded in .net but this seems like a big limitation in Composer. I like building subs in composer since the management of these imported subs (ability to update, ability to swap pkt files, ability to be saved in shared location on ACC, etc) is so much better than for .net coded subs, it would be a really shame to not be able to make conditionals.

0 Likes
Message 6 of 6

cory.honeyman
Explorer
Explorer

UPDATE: Progress, but still not working. 

 

Manually editing and adding the <ConditionalSubassembly>true</ConditionalSubassembly> to the atc file AND importing the pkt to the tool palette does allow proper nesting in the assembly. However, the nested subassemblies are still being built regardless.

 

I tested with a custom conditional using an offset target (so replicating the stock "ConditionalHorizontalTarget" sub) and it is also not working, so it is not just surface conditionals from Composer that don't work. It seems all conditionals from Composer don't work. 😞

 

So has anybody got this to work? I am doing something wrong? 

 

Progress: Nested, but still not working:

coryhoneyman_0-1760561608395.png

 

0 Likes