AutoCAD Civil 3D General

Reply
*Expert Elite*
doni49
Posts: 1,381
Registered: ‎12-22-2012
Message 1 of 15 (336 Views)

SAC: Using OffsetTarget.IsValid as Decision

336 Views, 14 Replies
04-03-2013 12:05 PM

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



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.


Forum links:
AutoCAD 2013/2014/2015
AutoCAD 2010/2011/2012

AutoLISP, VB and other AutoCAD customization


Civil 3D General
Civil 3d Cusomization

*Expert Elite*
KMercier_C3D
Posts: 238
Registered: ‎12-14-2010
Message 2 of 15 (335 Views)

Re: SAC: Using OffsetTarget.IsValid as Decision

04-03-2013 12:14 PM 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.

Co-author of "Mastering AutoCAD Civil 3D 2013"
AutoCAD Civil 3D 2013 Certified Professional and AutoCAD 2013 Certified Professional
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®
*Expert Elite*
doni49
Posts: 1,381
Registered: ‎12-22-2012
Message 3 of 15 (333 Views)

Re: SAC: Using OffsetTarget.IsValid as Decision

04-03-2013 12:17 PM 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



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.


Forum links:
AutoCAD 2013/2014/2015
AutoCAD 2010/2011/2012

AutoLISP, VB and other AutoCAD customization


Civil 3D General
Civil 3d Cusomization

*Expert Elite*
doni49
Posts: 1,381
Registered: ‎12-22-2012
Message 4 of 15 (329 Views)

Re: SAC: Using OffsetTarget.IsValid as Decision

04-03-2013 12:20 PM 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



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.


Forum links:
AutoCAD 2013/2014/2015
AutoCAD 2010/2011/2012

AutoLISP, VB and other AutoCAD customization


Civil 3D General
Civil 3d Cusomization

*Expert Elite*
doni49
Posts: 1,381
Registered: ‎12-22-2012
Message 5 of 15 (317 Views)

Re: SAC: Using OffsetTarget.IsValid as Decision

04-03-2013 01:06 PM 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



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.


Forum links:
AutoCAD 2013/2014/2015
AutoCAD 2010/2011/2012

AutoLISP, VB and other AutoCAD customization


Civil 3D General
Civil 3d Cusomization

Valued Mentor
fcernst
Posts: 1,088
Registered: ‎01-07-2011
Message 6 of 15 (313 Views)

Re: SAC: Using OffsetTarget.IsValid as Decision

04-03-2013 01:22 PM 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 2015
Ernst Engineering
www.ernstengineering.com
*Expert Elite*
doni49
Posts: 1,381
Registered: ‎12-22-2012
Message 7 of 15 (309 Views)

Re: SAC: Using OffsetTarget.IsValid as Decision

04-03-2013 01:30 PM 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



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.


Forum links:
AutoCAD 2013/2014/2015
AutoCAD 2010/2011/2012

AutoLISP, VB and other AutoCAD customization


Civil 3D General
Civil 3d Cusomization

Valued Mentor
fcernst
Posts: 1,088
Registered: ‎01-07-2011
Message 8 of 15 (300 Views)

Re: SAC: Using OffsetTarget.IsValid as Decision

04-03-2013 01:54 PM 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 2015
Ernst Engineering
www.ernstengineering.com
*Expert Elite*
doni49
Posts: 1,381
Registered: ‎12-22-2012
Message 9 of 15 (296 Views)

Re: SAC: Using OffsetTarget.IsValid as Decision

04-03-2013 02:17 PM 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.  :smileysad:

 

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



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.


Forum links:
AutoCAD 2013/2014/2015
AutoCAD 2010/2011/2012

AutoLISP, VB and other AutoCAD customization


Civil 3D General
Civil 3d Cusomization

*Expert Elite*
doni49
Posts: 1,381
Registered: ‎12-22-2012
Message 10 of 15 (264 Views)

Re: SAC: Using OffsetTarget.IsValid as Decision

04-04-2013 06:45 AM 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



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.


Forum links:
AutoCAD 2013/2014/2015
AutoCAD 2010/2011/2012

AutoLISP, VB and other AutoCAD customization


Civil 3D General
Civil 3d Cusomization

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community


Civil 3D Exchange Apps

Created by the community for the community, Autodesk Exchange Apps for AutoCAD Civil 3D helps you achieve greater speed, accuracy, and automation from concept to manufacturing.

Connect with Civil 3D

Twitter

Facebook

Blogs