Community
Civil 3D Forum
Welcome to Autodesk’s Civil 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Civil 3D topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SAC: Using OffsetTarget.IsValid as Decision

14 REPLIES 14
Reply
Message 1 of 15
doni49
1481 Views, 14 Replies

SAC: Using OffsetTarget.IsValid as Decision

I have a "Decision" in my SA -- the expression is "RockFillTarget.IsValid".  RockFillTarget is an Offset Target.  When I add this SA to my assembly and ultimately to my corridor, I set this targe to an offset alignment that I've got in the dwg file.

 

In areas where the offset alignment DOES exist, the Decision works great.  In the rest of the corridor where the the OA no longer exists, I'm getting a WARNING:  "Unable to get offset value from offset target".

 

The stations it lists are ALL after the OA no longer exists.  What I'd like to do is add something to the Decision's FALSE side to tell it not to throw these warnings.

 

Is that possible?



Don Ireland
Engineering Design Technician




If a reply solves your issue, please remember to click on "Accept as Solution". This will help other users looking to solve a similar issue. Thank you.


Please do not send a PM asking for assistance. That's what the forums are for. This allows everyone to benefit from the question asked and the answers given.

14 REPLIES 14
Message 2 of 15
KMercier_C3D
in reply to: doni49

It would be helpful if you share your pkt file to see how you are using the decision.



Kati Mercier, P.E. | LinkedIn | AutoCAD Civil 3D Certified Professional
Pronouns: She/Her
Co-author of "Mastering AutoCAD Civil 3D 2013"
AU2019 Speaker::: CES321590: Analyze and Revise Existing Subassembly Composer PKT Files for AutoCAD Civil 3D
AU2017 Speaker::: CI125544: Analyze and Devise in Subassembly Composer
AU2012 Speaker::: CI3001: Reverse Engineering with Subassembly Composer for AutoCAD Civil 3D
AU2011 Speaker::: CI4252: Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®

Message 3 of 15
doni49
in reply to: KMercier_C3D

Here it is.  It's still in progress.  But I think you'll get the idea.

 

There are several--the one I'm specifically asking about is the first one below "PaveBoxSequence".



Don Ireland
Engineering Design Technician




If a reply solves your issue, please remember to click on "Accept as Solution". This will help other users looking to solve a similar issue. Thank you.


Please do not send a PM asking for assistance. That's what the forums are for. This allows everyone to benefit from the question asked and the answers given.

Message 4 of 15
doni49
in reply to: KMercier_C3D

BTW--I was reading your blog posts about using variables and sequences etc in SAC.  That blog has been extremely helpful in building my SA this far.

 

Thanks!



Don Ireland
Engineering Design Technician




If a reply solves your issue, please remember to click on "Accept as Solution". This will help other users looking to solve a similar issue. Thank you.


Please do not send a PM asking for assistance. That's what the forums are for. This allows everyone to benefit from the question asked and the answers given.

Message 5 of 15
doni49
in reply to: KMercier_C3D

Kati,

 

Here's the final version just in case you want to see it.  But I don't think anything I changed after posting the previous version will affect the question at hand.

 

And when I say "Final Version", I mean that it's working the way I want it to OTHER THAN producing these warnings.  I'm really hoping I can get rid of them and call this little undertaking done.  My next task will be to update the code set to deal with the new code that I just added in this SA.



Don Ireland
Engineering Design Technician




If a reply solves your issue, please remember to click on "Accept as Solution". This will help other users looking to solve a similar issue. Thank you.


Please do not send a PM asking for assistance. That's what the forums are for. This allows everyone to benefit from the question asked and the answers given.

Message 6 of 15
fcernst
in reply to: doni49

This is happening to me too. Once the Corridor is past the Offset Target it is having troubles... like it can't forget the Target.

 

It actually sends the Target Link (that should have no Target now) back to the Assembly attachment point, which is the CL alignment in my case.

 

I have had to separate the Corridor into Regions for the extents past the Offset Target and manually turn off the Targeting for those Regions in Corridor Properties.

 

I sent this to Support and they said that custom objects are typically "out of scope" for product support. I responded about asking about the functioning of this SAC specific API call...and I haven't heard anything.

 

I thought we were being encouraged to use SAC as an integral part of C3D now. I don't see how it is "out of scope" for Product Support.



Fred Ernst, PE
C3D 2024
Ernst Engineering
www.ernstengineering.com
Message 7 of 15
doni49
in reply to: fcernst


@fcernst wrote:

It actually sends the Target Link (that should have no Target now) back to the Assembly attachment point, which is the CL alignment in my case.


 

 

That's actually the very reason I elected to add this Decision -- to stop it from resetting itself.

 

This version of my SA does that nicely -- but just throws these warnings.

 EDIT:  Correction -- your issue is SIMILAR to the issue that caused me to add the Decision.

 

Previously, I was using OOTB HorizontalTarget to target my OA.  But if the Daylight point was beyond the OA, the SurfaceLink was re-attaching itself to a different point (although I don't remember exactly which point now).  In my case, the OA was found -- but it was inside the daylight point so I didn't want the SurfaceLink to show at all but C3D was showing it but at the wrong place altogether.



Don Ireland
Engineering Design Technician




If a reply solves your issue, please remember to click on "Accept as Solution". This will help other users looking to solve a similar issue. Thank you.


Please do not send a PM asking for assistance. That's what the forums are for. This allows everyone to benefit from the question asked and the answers given.

Message 8 of 15
fcernst
in reply to: doni49

Yes, sounds like you're having to use it in multiple Decision objects and I want to use it all in Expressions, such as this nested IF statement:

 

IF(InvertAlignment.IsValid, IF(InvertProfile.IsValid,XOffsetByProfile,XOffsetByAlign),IF(InvertProfile.IsValid,XOffsetByProfile,XOffsetByDepth))

 

This works fine when the result is True, not so when False. (False being for the Corridor portions that are out of the range/extent of the Offset Target.)



Fred Ernst, PE
C3D 2024
Ernst Engineering
www.ernstengineering.com
Message 9 of 15
doni49
in reply to: fcernst

Oh man -- just when I was starting to get excited.  I just realized that even when the OA is NOT found, the curb is still shown.  I was so focused on what the daylight areas were doing, I didn't even notice that.  😞

 

The default pavement width is 8ft.  Then within the TRUE branch of the above mentioned Decision, I said that if the OA is found, place the curb at the OA.  The OA is at 7.5ft.  Well in areas where the OA does exist, I'm seeing the curb.  I just found that the curb is being shown at 8ft when the OA doesn't exist (I've confirmed this by looking at the cross section for an area in which I KNOW the OA doesn't exist).

 

I hate computer software bugs!



Don Ireland
Engineering Design Technician




If a reply solves your issue, please remember to click on "Accept as Solution". This will help other users looking to solve a similar issue. Thank you.


Please do not send a PM asking for assistance. That's what the forums are for. This allows everyone to benefit from the question asked and the answers given.

Message 10 of 15
doni49
in reply to: doni49

While laying in bed trying to go to sleep last night, I had a bit of an epiphany (SP?). I came up with a work-around to allow the decision to figure out if the OA is really there. It still doesn't get rid of the warnings but I'll take what I can get.

 

I've added an "AuxillarySurfaceLink (AL1)". It has a Start (AP4) of -1 and End(AP3) of 0. But I set the "OffsetTarget" of AP3 to my OA. I set the start to negative 1 so that the two points wouldn't be equal--I don't really need two points but this is the only way (that I've found) to spec a point that has a distance that can be overridden by an offset target.

 

So if the OA is NOT found, AP3.x will be 0. If it IS found, AP3.x will equal OA.x. Which allows me to change my Decision expression to AP3.x<>0. If that expression is true, then it places my curb. If it's not true, it will NOT place my curb.

 

The attached pkt file HAS been tested and correctly shows/does not show the curb based on whether or not the OA is found.

 

Here's a screen shot of the SA's flowchart.

 

SAC_Curb.png



Don Ireland
Engineering Design Technician




If a reply solves your issue, please remember to click on "Accept as Solution". This will help other users looking to solve a similar issue. Thank you.


Please do not send a PM asking for assistance. That's what the forums are for. This allows everyone to benefit from the question asked and the answers given.

Message 11 of 15
fcernst
in reply to: doni49

Good job. Yes, if the Target.IsValid API is not going to work for me in the False condition, then I'll probably have to use this Auxillary approach and have to change all of my Offset and Profile test condition statements in the nested IF functions of all my Expressions. 

 

I imagine the Warnings are simply indicating that the Target is not being found?



Fred Ernst, PE
C3D 2024
Ernst Engineering
www.ernstengineering.com
Message 12 of 15
doni49
in reply to: fcernst

Ok.  ANOTHER Epiphany!  🙂

 

I've found a way to make it so that I don't even need the OA. 


I need curb on the left and right side from 0+00 to 0+40.  So I had created offset alignments from to and from the appropriate stations at 7.5ft left and right.  Then I had my SA searching for these OAs as a way to decide whether or not to show the curbs.

 

WELLLLLLLLL.......

 

I found a nifty little thing that I can use in a decision called Baseline.Station.  If that number is Equal to 0 OR 40 or if that number is BETWEEN those two values, it draws the curb.  NO OA NEEDED.  YIPPEE  🙂

 

EDIT:  Here's what the flowchart looks like.

 

SAC_BoatRampFinal.png



Don Ireland
Engineering Design Technician




If a reply solves your issue, please remember to click on "Accept as Solution". This will help other users looking to solve a similar issue. Thank you.


Please do not send a PM asking for assistance. That's what the forums are for. This allows everyone to benefit from the question asked and the answers given.

Message 13 of 15
fcernst
in reply to: doni49

 

Hey Doni,

 

I received this confirmation of the OffsetTarget.IsValid (Offset Target Class) defect. I am using the workaround you suggested, just slightly modified to use one Auxillarry Point to test for movement to provide a True/False Decision making capability.

 

We are using this in our custom ditch subassembly. This workaround won't have the same performance as the API function.

 

Capture.JPG



Fred Ernst, PE
C3D 2024
Ernst Engineering
www.ernstengineering.com
Message 14 of 15
don.ireland
in reply to: fcernst

Thanks for the update.

Message 15 of 15
millsy.g
in reply to: don.ireland

Is there any futher update on this issue? I have the same problem with a stripping subassembly I have created. I'm not sure the work arounds discussed here will work for me.

 

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

Post to forums  

Rail Community


Autodesk Design & Make Report