Community
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SAC: Improve the .IsValid expression

SAC: Improve the .IsValid expression

When we add an offset target (called such as "off_target1" ) in our custom subassembly, we can use a Decision with the expression "off_target1.IsValid=True".

The true branch means that the user has assigned a (polyline, alignment or FL) for that offset target.

 

But if we have a report message in the false branch, we might get that message in the event viewer due to the calculated cross section doesn't find data about the selected polyline.

For example, imagine a corridor from the 0 station to 90 station but the polyline reach until the station 72.

This means, that every calculated station from 72 station to 90 station will send a report about the offset target is not assigned.

 

I have custom subassemblies where I do a particular operation when the offset is not found (IsValid=false) and another operation when the offset target is found (IsValid=true), but I can't warn to the user that he just assign an element to that offset target from a report message.

 

In my opinion, SAC API should differentiate this: if an element is assigned to that target from the corridor region And if the element is found in the calculated cross eection.

 

Maybe, should be: IsAssigned and IsValid

2 Comments
Dexterel
Collaborator

To have separate IsAssigned and IsValid are useful especially for this propose:

To be able to check and warn if the target is unreachable. Maybe if you assign a target elevation you need to ensure its valid for the entire corridor region.

joantopo
Mentor

Exactly, I want to warn to the user if he doesn't assign an offset target (because it is obligatory) but there it doesn't matter if IsValid is true or false in the Decision because in fact I do a particular case for each scenario so I musn't warn to the user with IsValid=false.

Can't find what you're looking for? Ask the community or share your knowledge.

Submit Idea  

Answer Day

Rail Community


 

Autodesk Design & Make Report