PDA

View Full Version : Property Set problems in ABS2007.1



stelthorst
2007-06-06, 10:32 PM
Hi All,

Property set formulas drive me crazy. :screwy: :banghead:

What's wrong with this formula?

CDbl( Right( [Style], 2 ) )

I'm sure I have a space where it shouldn't be or I need to add a space where I don't have one but I can't figure out what's wrong. I used the "Insert VBScript code" to add the codes so you would think it would work.

Is it just me or are VBScript codes not very intuitive?

dkoch
2007-06-08, 01:51 AM
Hi All,

Property set formulas drive me crazy. :screwy: :banghead:

What's wrong with this formula?

CDbl( Right( [Style], 2 ) )

I'm sure I have a space where it shouldn't be or I need to add a space where I don't have one but I can't figure out what's wrong. I used the "Insert VBScript code" to add the codes so you would think it would work.

Is it just me or are VBScript codes not very intuitive?

VBScript is fairly forgiving of extra spaces or missing ones - at least in formula properties it seems to be (only place I have ever used it).

Your syntax looks good to me. Perhaps the following observations will help you ferret out the problem:

I assume that [Style] is a property reference. Is the value contained within [Style] a string? The Right function works with strings, not numbers. Even if the value is a string, VBScript as implemented for formulas may not be interpreting it as such. Try enclosing [Style] in double quotation marks, like this: "[Style]" and see if that helps.
The Right function should be returning a string to the CDbl function - a two-character string if Style had at least two characters. If these characters are not numeric, CDbl will likely fail and cause the formula to crash. If the characters are numeric, then the CDbl function should return the real number equivalent.

stelthorst
2007-06-11, 06:19 PM
I assume that [Style] is a property reference. Is the value contained within [Style] a string? The Right function works with strings, not numbers. Even if the value is a string, VBScript as implemented for formulas may not be interpreting it as such. Try enclosing [Style] in double quotation marks, like this: "[Style]" and see if that helps.
We have a winner! :)

Thanks David, that's all it took. I enclosed the [Style] in quotation marks and the PSD returned the value I was wanting.

Now for the big question. I used this PSD to return the size of the beam. Here's what I want to do next.

I would like to find the bottom of the beam as it relates to the floor below. This would be a formula similar to ZX + (Z - B)
Where
ZX = Insertion point of xref (Let's say Z = 15'-10")I
Z = Insertion point of beam (ie slab thickness -5.5")
B = Beam thickness (say 30")

With the numbers in my example it should return a value of 12'-10-1/2" (15'-10" + (-5.5-30))

I'm able to find Z and B but don't know how to find the xref insertion Z elevation.

Any ideas?

buzz
2007-12-05, 06:11 PM
I used the "Insert VBScript code" to add the codes so you would think it would work.

I am trying to insert vbscript code into a Property Definition formula, but the area labeled "Insert vbscript code" is complete empty - no codes to insert. Is there something I need to do to enable those codes to be inserted?

I attached a screenshot for clarification...

-Buzz

dkoch
2007-12-06, 12:46 PM
I am trying to insert vbscript code into a Property Definition formula, but the area labeled "Insert vbscript code" is complete empty - no codes to insert. Is there something I need to do to enable those codes to be inserted?

I attached a screenshot for clarification...

-Buzz
Well that is certainly odd. I have never seen a blank VBScript code area before. Perhaps you are missing an ARX file, or one has gone bad. Have you tried a registry repair or a repair installation? (Back up your customizations first, just to be safe.)

buzz
2007-12-06, 02:59 PM
David,

No I had not tried that, but I took a look at 4 other machines and they all have the same problem... dang. I'll try a repair and post back with the results...

-Buzz