| Author |
Message |
Frank
Guest
|
Posted:
Wed Apr 06, 2005 5:23 pm Post subject:
Property formula |
|
|
Is it possible to put a formula into a property that would be able to round
the square footage up or down to the nearest whole number?
ant help would be appreciated
thanks
|
|
| Back to top |
|
 |
Joe Sutphin
Guest
|
Posted:
Wed Apr 06, 2005 5:55 pm Post subject:
Re: Property formula |
|
|
Use the Round function of Visual Basic.
Round(120.5, 0) would return 120
Round(121.5, 0) would return 122
Both examples return the correct values. HTH ...
Joe
--
"Frank" <fmagnotta@mckinleyassoc.com> wrote in message
news:4253e301$1_1@newsprd01...
| Quote: | Is it possible to put a formula into a property that would be able to
round the square footage up or down to the nearest whole number?
ant help would be appreciated
thanks
|
|
|
| Back to top |
|
 |
Norman Yuan
Guest
|
Posted:
Wed Apr 06, 2005 6:06 pm Post subject:
Re: Property formula |
|
|
Yes, of course. Example in following class module:
Option Explicit
Private mvarMyNumber As Double
Public Property Let MyNumber(ByVal vData As Integer)
mvarMyNumber = CDbl(vData)
End Property
Public Property Get MyNumber() As Integer
MyNumber = CInt(mvarMyNumber) '''or other formula/function you want to
use
End Property
Private Sub Class_Initialize()
mvarMyNumber = 1.2345
End Sub
Public Sub Process()
'' some processing that set/change mvarMyNumber's value
End Sub
Thus, a double number is used internally in the class as Double, while
outside the class it can only be accessed as Integer. You can put whatever
formula in Property Get procedure. You may not want to use Property Let to
assign value to the double variable in certain situation in order to prevent
accuracy loss, though.
"Frank" <fmagnotta@mckinleyassoc.com> wrote in message
news:4253e301$1_1@newsprd01...
| Quote: | Is it possible to put a formula into a property that would be able to
round
the square footage up or down to the nearest whole number?
ant help would be appreciated
thanks
|
|
|
| Back to top |
|
 |
Frank
Guest
|
Posted:
Thu Apr 07, 2005 5:38 pm Post subject:
Re: Property formula |
|
|
i need the rounded up square footage to be able it be extracted to a tag.
The sq ft comes from the property set definition 'SpaceObjects' and the
'NetFloorArea' property definition. I need this number to be a whole number
(no Decimals) in the tag.
sorry if i mislead you
"Frank" <fmagnotta@mckinleyassoc.com> wrote in message
news:4253e301$1_1@newsprd01...
| Quote: | Is it possible to put a formula into a property that would be able to
round the square footage up or down to the nearest whole number?
ant help would be appreciated
thanks
|
|
|
| Back to top |
|
 |
Oberer
Guest
|
Posted:
Thu Apr 07, 2005 7:39 pm Post subject:
Re: Property formula |
|
|
frank, joe's suggestion didn't work?
you're doing the following?
-retrieving the blocks attributes
-retrieveing the specific attribute to modify
-using joe's suggestion to round your value
-updating the block |
|
| Back to top |
|
 |
Joe Sutphin
Guest
|
Posted:
Thu Apr 07, 2005 9:30 pm Post subject:
Re: Property formula |
|
|
What doesn't work? An example please ...
Joe
--
"Oberer" <nospam@address.withheld> wrote in message
news:4890455.1112888397304.JavaMail.jive@jiveforum2.autodesk.com...
| Quote: | frank, joe's suggestion didn't work?
you're doing the following?
-retrieving the blocks attributes
-retrieveing the specific attribute to modify
-using joe's suggestion to round your value
-updating the block |
|
|
| Back to top |
|
 |
Frank
Guest
|
Posted:
Thu Apr 07, 2005 10:41 pm Post subject:
Re: Property formula |
|
|
no it did not work
what i did was to create a new space object formula as follows:
round([NetFloorArea],0) I named this "Area (round)". I was then going to
create a tag that would use this space definition. However when i add the
property to the space and then check the property, it just shows
"round([NetFloorArea],0)" in the property box.
"Oberer" <nospam@address.withheld> wrote in message
news:4890455.1112888397304.JavaMail.jive@jiveforum2.autodesk.com...
| Quote: | frank, joe's suggestion didn't work?
you're doing the following?
-retrieving the blocks attributes
-retrieveing the specific attribute to modify
-using joe's suggestion to round your value
-updating the block |
|
|
| Back to top |
|
 |
Oberer
Guest
|
Posted:
Thu Apr 07, 2005 11:28 pm Post subject:
Re: Property formula |
|
|
Sorry Frank, I'm completely lost on this one. I was thinking you were using VBA code :)
hopefully someone can help you with your space object formula?? |
|
| Back to top |
|
 |
Joe Sutphin
Guest
|
Posted:
Fri Apr 08, 2005 12:03 am Post subject:
Re: Property formula |
|
|
I don't follow. What is a ""space object?" I'm assuming you want to assign a
value to an attribute tag in block definition?
What are you referring to as the "property box"
Joe
--
"Frank" <fmagnotta@mckinleyassoc.com> wrote in message
news:42557f32$1_3@newsprd01...
| Quote: | no it did not work
what i did was to create a new space object formula as follows:
round([NetFloorArea],0) I named this "Area (round)". I was then going to
create a tag that would use this space definition. However when i add the
property to the space and then check the property, it just shows
"round([NetFloorArea],0)" in the property box.
"Oberer" <nospam@address.withheld> wrote in message
news:4890455.1112888397304.JavaMail.jive@jiveforum2.autodesk.com...
frank, joe's suggestion didn't work?
you're doing the following?
-retrieving the blocks attributes
-retrieveing the specific attribute to modify
-using joe's suggestion to round your value
-updating the block
|
|
|
| Back to top |
|
 |
Mike Tuersley
Guest
|
Posted:
Fri Apr 08, 2005 12:07 am Post subject:
Re: Property formula |
|
|
I think he's either trying to use Fields or props out of ADT.
-- Mike
___________________________
Mike Tuersley
___________________________
the trick is to realize that there is no spoon... |
|
| Back to top |
|
 |
Joe Sutphin
Guest
|
Posted:
Fri Apr 08, 2005 12:12 am Post subject:
Re: Property formula |
|
|
So he wants to put a formula in a Property TextBox?
I don't believe that will evaluate to anything. I can't imagine Autodesk
creating such a thing but it would be an interesting concept.
Joe
--
"Mike Tuersley" <mtuersley_NOT_@rand.com> wrote in message
news:1274y41xaza2g$.1pft5ml1b5gmc$.dlg@40tude.net...
| Quote: | I think he's either trying to use Fields or props out of ADT.
-- Mike
___________________________
Mike Tuersley
___________________________
the trick is to realize that there is no spoon... |
|
|
| Back to top |
|
 |
Jorge Jimenez
Guest
|
Posted:
Fri Apr 08, 2005 2:41 am Post subject:
Re: Property formula |
|
|
What flavor of AutoCAD are you using ?
And what version ?
--
Saludos, Ing. Jorge Jimenez, SICAD S.A., Costa Rica
"Frank" <fmagnotta@mckinleyassoc.com> wrote in message
news:4253e301$1_1@newsprd01...
| Quote: | Is it possible to put a formula into a property that would be able to
round the square footage up or down to the nearest whole number?
ant help would be appreciated
thanks
|
|
|
| Back to top |
|
 |
Mike Tuersley
Guest
|
Posted:
Fri Apr 08, 2005 6:33 am Post subject:
Re: Property formula |
|
|
Just a guess. I've seen a lot of them recently with people wanting to put
formulae in fields. And, it definitely would be interesting!
-- Mike
___________________________
Mike Tuersley
___________________________
the trick is to realize that there is no spoon... |
|
| Back to top |
|
 |
Frank
Guest
|
Posted:
Fri Apr 08, 2005 8:33 pm Post subject:
Re: Property formula |
|
|
Thanks for all the help. i figured it out. all i had to do was to create a
new property data format with percision set to 0 and that solved my problem
"Frank" <fmagnotta@mckinleyassoc.com> wrote in message
news:4253e301$1_1@newsprd01...
| Quote: | Is it possible to put a formula into a property that would be able to
round the square footage up or down to the nearest whole number?
ant help would be appreciated
thanks
|
|
|
| Back to top |
|
 |
HJohn
Guest
|
Posted:
Fri Apr 08, 2005 8:50 pm Post subject:
Re: Property formula |
|
|
| Well, you figured out your problem but I still haven't figure out that where you trying to do. It would be great if you could give more detail on the problem so we could learn from it. |
|
| Back to top |
|
 |
|
|
|
|