Basically, what I'm trying to do is use the OffsetTarget.IsValid variable as a decision switch so that when the target is found, the true condition is applied and continues along that branch. I can get this to work when using other variable as switches (i.e. input parameters), but not with OffsetTarget.IsValid. Any thoughts? Has anyone gotten a decision to work based on that?
On another note, when working with decisions/switches is there a way to have the preview show the one you are currently working on?
Thanks.
Solved! Go to Solution.
Solved by SkipBurns. Go to Solution.
Skip,
What is happening on your version? Are you getting and error or does it always hit the false condition? One challange you are going to face is that the conditional will never fail in layout mode.
On your note, this already in the wish list for a future release. Right now the way that I might work around it would be to bypass the switch when I'm working on a branch.
Regards,
Peter Funk
Autodesk, Inc.
Let's say your offset target name is OS. Is your code OS.IsValid?
@mathewkol wrote:Let's say your offset target name is OS. Is your code OS.IsValid?
It is. I figured out another way to do it though. I added an "Output" for a point that targets my horizontal offset. I made the decision Output>.01 and it works (the default offset is 0, so if it finds a target at all, then the condition is true).
Basically what I have made is a pavement section that automatically adds a driveway instead of a curb if you have a polyline targeted with the offset.
So I just draw polylines at all my driveways, put them on a layer, add my one subassembly and mirror it, then add the layer that the driveway polylines are on as targets for my "driveway" condition and just like that I have a large portion of my corridor done with two subassemblies where it used to take many generic links and link to mark points to get it setup and coded the way I needed.
Thanks for the help guys. I'll post the SA when I'm back at work.
Attached is my Subassembly. It has targets for driveway and curbless sections. I need to clean it up a lot more, but overall I'm pretty happy with it.
I also attached an image of what it used to take to accomplish the same thing that this one subassembly does