Hi, I have fairly limited experience with the SAC so would love a bit of help...
I have created a Kerb and Subbase Subassembly where the Subbase Grade can either be input by the user, or, if Superelevation Data exists, uses that.
The Subassembly seems to use the Superelevation data OK, but where no Superelevation data exists, will only use the default grade from within SAC 'SubbaseSlope'. I'm assuming the problem lies with the 'SlopeCalc' Expression but cannot work it out...? Also, am I correct in having the 'SlopeCalc' Variable at the start of the Flowchart or should it sit in the 'Subbase' Sequence instead?
if((Side=Left)AND(SE.HasLeftLI), SE.LeftLI,
if((Side=Left)AND(SE.HasLeftLO), SE.LeftLO,
if((Side=Left)AND(SE.HasLeftSI), SE.LeftSI,
if((Side=Left)AND(SE.HasLeftSO), SE.LeftSO,
if((Side=Right)AND(SE.HasRightLI), SE.RightLI,
if((Side=Right)AND(SE.HasRightLO), SE.RightLO,
if((Side=Right)AND(SE.HasRightSI), SE.RightSI,
if((Side=Right)AND(SE.HasRightSO), SE.RightSO,
CType(-SubbaseSlope,Double)))))))))
I have attached the Subassembly for reference.
Any help would be greatly appreciated.
Regards.
Solved! Go to Solution.
Solved by Civil3DReminders. Go to Solution.
This part of the equation: CType(-SubbaseSlope,Double))))))))) needs to be changed to the slope value you want to use. This is where it is setting the slope.
I usually keep everything up at the top for easy finding of the variables. Either way works though.
I have an Input/Output Paremeter called Name=SubbaseSlope, Type=Grade, Direction=Input, Default Value=-3.00%
Isn't this the Variable I should be referencing as the user's input value in the absence of any Superelevation Data?
What does the '-' do prior to the variable? Or is that just a 'Negative' sign?
Thanks.
Ross.
If you copied the expression from my blog, then the negative sign reverses what is listed in the properties window, which may be confusing you. Removing the negative sign might give you the results you are expecting.
I like my lane slopes to be what the value is when I talk. The lane has a 2% cross fall, so I want to enter 2% in the box. Therefore it might be what is wrong when you try it out.
I have a situation that is closely tied to what you fellas have noted here. I'm trying to coordinate having a complex lane, shoulder, with subbase SA to have superelvation met within the Custom SA. So essentially I have Lane, Shoulder, and Subbase superelevation. How would I arrange this in SAC. I have the following, but I can't seem to peg the arrangement correctly to get this to work. Do you have a reference to the VB.net code for Corridors and everything that might be available? Thanks in advance!
Is this supposed to work for all 3 or am I thinking about this wrong? I need to have the Lane and the Subbase link follow the Lane SE, and the Shoulder to follow the Shoulder SE. How does Civil 3D tie the below to the actual links in the SA? I assume it's by setting the variables within as LaneSlope, ShoulderSlope, and SubbaseSlope, while having the statement below defined?
if((Side=Left)AND(SE.HasLeftLI), SE.LeftLI,
if((Side=Left)AND(SE.HasLeftLO), SE.LeftLO,
if((Side=Left)AND(SE.HasLeftSI), SE.LeftSI,
if((Side=Left)AND(SE.HasLeftSO), SE.LeftSO,
if((Side=Right)AND(SE.HasRightLI), SE.RightLI,
if((Side=Right)AND(SE.HasRightLO), SE.RightLO,
if((Side=Right)AND(SE.HasRightSI), SE.RightSI,
if((Side=Right)AND(SE.HasRightSO), SE.RightSO,
CType(LaneSlope,Double),
CType(ShoulderSlope,Double),
CType(SubbaseSlope,Double),
))))))))
Can you draw a decision diagram of what you are trying to get? Right now it looks like you only need to do is use those formulas you have in a variable for each one.
I've attached an image of what I have set for the SuperLane. I just can't peg where to put the other 2 "Define Variables", one being for SuperShoulder, and one being for SuperSubbase, thoughts? Image attached.
You need one variable for each slope. Kind of like in the attached packet file. Also you shouldn't need to do left and right decision since the expression accounts for it.
Unfortunately I don't have the 2015 Subassembly Composer to checkout the initial posting's pkt file. (working on this as we speak). I removed the Left/Right decision as mentioned, still isn't working, after full testing scenerio.
Step 1: I have all my "Define Variables for Superelevation control up front... (Using the code shown below x4)
Step 2: Define lane, shoulder, etc... with points and links.
- Am I missing a step in the process?
Code:
if((Side=Left)AND(SE.HasLeftLO), SE.LeftLO,
if((Side=Left)AND(SE.HasLeftLI), SE.LeftLI,
if((Side=Left)AND(SE.HasLeftSO), SE.LeftSO,
if((Side=Left)AND(SE.HasLeftSI), SE.LeftSI,
if((Side=Right)AND(SE.HasRightLO), SE.RightLO,
if((Side=Right)AND(SE.HasRightLI), SE.RightLI,
if((Side=Right)AND(SE.HasRightSO), SE.RightSO,
if((Side=Right)AND(SE.HasRightSI), SE.RightSI,
CType(LaneSlope,Double)))))))))
- I have 4 total all similar to above for LaneSlope, ShoulderLope, SubbaseSlope, and BaseSlope.
Thanks.
The attached image is what I have in the pkt.
Here is what is in each of them:
if((Side=Left)AND(SE.HasLeftLI), SE.LeftLI,
if((Side=Left)AND(SE.HasLeftLO), SE.LeftLO,
if((Side=Left)AND(SE.HasLeftSI), SE.LeftSI,
if((Side=Left)AND(SE.HasLeftSO), SE.LeftSO,
if((Side=Right)AND(SE.HasRightLI), SE.RightLI,
if((Side=Right)AND(SE.HasRightLO), SE.RightLO,
if((Side=Right)AND(SE.HasRightSI), SE.RightSI,
if((Side=Right)AND(SE.HasRightSO), SE.RightSO,
CType(-LaneSlope,Double)))))))))
if((Side=Left)AND(SE.HasLeftLI), SE.LeftLI,
if((Side=Left)AND(SE.HasLeftLO), SE.LeftLO,
if((Side=Left)AND(SE.HasLeftSI), SE.LeftSI,
if((Side=Left)AND(SE.HasLeftSO), SE.LeftSO,
if((Side=Right)AND(SE.HasRightLI), SE.RightLI,
if((Side=Right)AND(SE.HasRightLO), SE.RightLO,
if((Side=Right)AND(SE.HasRightSI), SE.RightSI,
if((Side=Right)AND(SE.HasRightSO), SE.RightSO,
CType(-ShoulderSlope,Double)))))))))
if((Side=Left)AND(SE.HasLeftLI), SE.LeftLI,
if((Side=Left)AND(SE.HasLeftLO), SE.LeftLO,
if((Side=Left)AND(SE.HasLeftSI), SE.LeftSI,
if((Side=Left)AND(SE.HasLeftSO), SE.LeftSO,
if((Side=Right)AND(SE.HasRightLI), SE.RightLI,
if((Side=Right)AND(SE.HasRightLO), SE.RightLO,
if((Side=Right)AND(SE.HasRightSI), SE.RightSI,
if((Side=Right)AND(SE.HasRightSO), SE.RightSO,
CType(-SubbaseSlope,Double)))))))))
What type of error are you seeing? What does the Point properties look like where you are using the above values?
I can get the superelevation to superelevate at this point. For whatever reason it won't apply the Input Slopes that are set at 2%Lane, 5% shoulder and 3% subbase, 2% base. Everything defaults to 2% when no superE is present.
The build is setup where the Super* values are defined up front with what you've identified... Lane, Base, Shoulder, and Subbase variables. I've placed these within the slope values for those links. Thoughts?
I tested it this SA on another alignment with zero superelevation settings what so ever, with an end result of 0% slopes for all variables, seems odd to me.
Do you mind sharing your packet? I'm fairly certain we could go back and forth for days without getting to the solution.
Well, it looks like a case of poor implementation of a feature in Subassembly Composer is the issue, I guess I shouldn't be surprised. Who ever wrote the implementation is just looking to see if there is superelevation is applied ANYWHERE on the alignment and the telling SAC that there is superelevation applied at that station even if there isn't. The workaround is to make sure there is an applied superelevation value at every point along the alignment.
The same thing happens for horizontal targets with the .IsValid which doens't check to see if the target is valid at the station, but if it has a target assigned.
To confirm what you're saying.... The fact it doesn't work as it should isn't because of the user. It is because the implementation of the Subassembly Composer and how it relates to these kinds of things? In other words, if someone from Autodesk stumbles across this they may or may not take this forward and make the neccessary changes to have this work properly. If someone has a work around to have this work properly I'd be more than happy to hear about it. Thanks for your help on this one!