Author Topic: Field behaviour not perfect  (Read 3157 times)

0 Members and 1 Guest are viewing this topic.

Serge J. Gianolla

  • Guest
Field behaviour not perfect
« on: June 10, 2006, 02:53:21 AM »
Hy guys,
I am adding programmatically fields for bearing 'n distance to a line. I need help here coz it does not behave!
Code: [Select]
   (setq oDroite (vlax-ename->vla-object...
         (setq sFieldLabl
   (strcat
       "%<\\AcObjProp Object (%<\\_ObjId " (itoa (vla-get-objectid oDroite))
    ">%).Angle \\f \"%au1\">%"
    "\\X"
       "%<\\AcObjProp Object (%<\\_ObjId " (itoa (vla-get-objectid oDroite))
    ">%).Length \\f \"%lu2%ct8[0.001]\">%"
   )
       )

  (command "_.DIMALIGNED" pSt pNxt "_M" sFieldLabl pNxt "")
The fields are not added because I am grabbing the line length in mm and thru conversion factor I want to display in m! If i leave it in metres they both print.

Now, this is where it gets weird:
If I print the field in metres without the bearing [angle for those not familiar] it does work!!
Anyone encountered that behaviour - or lack of - and found a way to remedy?
As well, if someone would be kind enough to show me how to display a proper degree symbol [like %%d] for fields, instead of stupid simplistic letter d!


Jürg Menzi

  • Swamp Rat
  • Posts: 599
  • Oberegg, Switzerland
Re: Field behaviour not perfect
« Reply #1 on: June 10, 2006, 06:45:09 AM »
(...) As well, if someone would be kind enough to show me how to display a proper degree symbol [like %%d] for fields, instead of stupid simplistic letter d!

(strcat "%<\AcObjProp Object (%<\\_ObjId " (itoa (vla-get-objectid oDroite)) ">%)" ".Angle \f "%au1%ps[,°]">%"
...

 :-)
A computer's human touch is its unscrupulousness!
MENZI ENGINEERING GmbH
Current A2k16... A2k24 - Start R2.18

Jim Yadon

  • Guest
Re: Field behaviour not perfect
« Reply #2 on: June 10, 2006, 01:21:15 PM »
(...) As well, if someone would be kind enough to show me how to display a proper degree symbol [like %%d] for fields, instead of stupid simplistic letter d!

(strcat "%<\AcObjProp Object (%<\\_ObjId " (itoa (vla-get-objectid oDroite)) ">%)" ".Angle \f "%au1%ps[,°]">%"
...

 :-)

Will [alt]+[0], [alt]+[1],  [alt]+[7], [alt]+[6] not give you the results you're after? (a.k.a. Hold down the ALT key and type 0176)

Serge J. Gianolla

  • Guest
Re: Field behaviour not perfect
« Reply #3 on: June 10, 2006, 07:02:16 PM »
(...) As well, if someone would be kind enough to show me how to display a proper degree symbol [like %%d] for fields, instead of stupid simplistic letter d!

(strcat "%<\AcObjProp Object (%<\\_ObjId " (itoa (vla-get-objectid oDroite)) ">%)" ".Angle \f "%au1%ps[,°]">%"
...

 :-)
Nice try Jürg but this is adding the symbol at the very end! If it was reading only full degrees that would work, but it puts it after values for minutes and/or seconds.
This is the 3rd year with fields, you'd think that people would have requested that and Autodesk would be on top of it :-o ... bwah wah

Serge J. Gianolla

  • Guest
Re: Field behaviour not perfect
« Reply #4 on: June 10, 2006, 07:05:56 PM »
(...) As well, if someone would be kind enough to show me how to display a proper degree symbol [like %%d] for fields, instead of stupid simplistic letter d!

(strcat "%<\AcObjProp Object (%<\\_ObjId " (itoa (vla-get-objectid oDroite)) ">%)" ".Angle \f "%au1%ps[,°]">%"
...

 :-)

Will [alt]+[0], [alt]+[1],  [alt]+[7], [alt]+[6] not give you the results you're after? (a.k.a. Hold down the ALT key and type 0176)

Hi Jay,
Thanx but we are not talking about normal text but fields. Or do you know a way to do it? I'll paraphrase Frasier here: "I am listening" :-D

Jürg Menzi

  • Swamp Rat
  • Posts: 599
  • Oberegg, Switzerland
Re: Field behaviour not perfect
« Reply #5 on: June 10, 2006, 07:41:17 PM »
Quote from: Serge J
Nice try Jürg but this is adding the symbol at the very end! If it was reading only full degrees that would work, but it puts it after values for minutes and/or seconds.

You asked for a proper degree symbol [like %%d]... and that is it, ok?

Quote
This is the 3rd year with fields, you'd think that people would have requested that and Autodesk would be on top of it :-o ... bwah wah

[rant mode on]Do you think that A'desk ever had listening to some requests?[/rant mode off]
A computer's human touch is its unscrupulousness!
MENZI ENGINEERING GmbH
Current A2k16... A2k24 - Start R2.18

Serge J. Gianolla

  • Guest
Re: Field behaviour not perfect
« Reply #6 on: June 10, 2006, 07:57:35 PM »
Quote from: Serge J
Nice try Jürg but this is adding the symbol at the very end! If it was reading only full degrees that would work, but it puts it after values for minutes and/or seconds.

You asked for a proper degree symbol [like %%d]... and that is it, ok?

Quote
This is the 3rd year with fields, you'd think that people would have requested that and Autodesk would be on top of it :-o ... bwah wah

[rant mode on]Do you think that A'desk ever had listening to some requests?[/rant mode off]


Yep Jürg, sorry for misunderstanding. I meant symbol for my request on bearing, but I realise not everyone is in Surveying game. Typically a bearing will show mins, secs and even to 1/100 of seconds!
As for remark on Autodesk I agree, that's why it was red, outstanding graphically as well as emoticonally - I coined a new word?