Author Topic: Offset Adjustments in Expressions  (Read 1561 times)

0 Members and 1 Guest are viewing this topic.

dfarris75

  • Guest
Offset Adjustments in Expressions
« 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...

dfarris75

  • Guest
Re: Offset Adjustments in Expressions
« Reply #1 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.

sinc

  • Guest
Re: Offset Adjustments in Expressions
« Reply #2 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).

dfarris75

  • Guest
Re: Offset Adjustments in Expressions
« Reply #3 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.

dfarris75

  • Guest
Re: Offset Adjustments in Expressions
« Reply #4 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!

sinc

  • Guest
Re: Offset Adjustments in Expressions
« Reply #5 on: September 16, 2009, 03:25:13 PM »
What, you expect me to know how to type, too?   :-)