TheSwamp

CAD Forums => Vertically Challenged => Land Lubber / Geographically Positioned => Topic started by: dfarris75 on September 16, 2009, 02:40:13 PM

Title: Offset Adjustments in Expressions
Post by: dfarris75 on September 16, 2009, 02:40:13 PM
I created an expression to adjust the offset of my structures, but whenever the offset is to the left, or negative, of the alignment it is adding rather than subtracting. I guess when it sees that it is left (negative) of the alignment then it is adding the two instead. Is there a way to adjust the expression so that it will know not to do that? Or will I have to create two separate expressions, and hence labels, in order to get the adjustment I want on both sides?

Looking at conditional expressions now...
Title: Re: Offset Adjustments in Expressions
Post by: dfarris75 on September 16, 2009, 02:46:20 PM
Here's what I have at this point

{Structure Offset}-2.083371

I guess I need a condition that will tell it if the offset is negative then add the value.

Like IF {Structure Offset} = (negative value) THEN +2.083371

But I don't know how to write it so that C3d knows what I'm talking about... Plz help.
Title: Re: Offset Adjustments in Expressions
Post by: sinc on September 16, 2009, 03:12:47 PM
IF({Structure Offset} < 0, {Structure Offset} + 2.083371, {Structure Offset} - 2.3083371)


Civil 3D may not want all those spaces.  I put them in there to make the post more readable.

By the way, when you change the color of text like that, the attached image shows what it can look like for others (hard to read).
Title: Re: Offset Adjustments in Expressions
Post by: dfarris75 on September 16, 2009, 03:19:28 PM
Sorry bout that. Where the heck do you change the board theme anyway? I'm using the default lt grey/lt blue scheme.

Thanks for the help! Off to input that and test it.
Title: Re: Offset Adjustments in Expressions
Post by: dfarris75 on September 16, 2009, 03:22:15 PM
Just had to fix the second number. You had added a 3 in there. Otherwise works great now! Thanks a bunch!
Title: Re: Offset Adjustments in Expressions
Post by: sinc on September 16, 2009, 03:25:13 PM
What, you expect me to know how to type, too?   :-)