Author Topic: FIELD Bugs in windows x64  (Read 3950 times)

0 Members and 1 Guest are viewing this topic.

hanhphuc

  • Newt
  • Posts: 64
FIELD Bugs in windows x64
« on: April 04, 2020, 02:57:08 AM »
hi guys

i have a FIELD expression working fine in ac2007 old 32bit desktop
LINE's delta properties= x,y  multiply scale factor
eg: 0.03,-0.04 x 1000, then entmake MTEXT should display

dX=30
dY=-40


but weird, Bricscad/v19/win7 x64 (sorry as i'm newbie)
dX %<cExpr (1000 * %<cObjProp Object(%<\_ObjId 1889532720>%).Delta

after double click to edit it became
dX %<\_FldIdx 0a
(if ACAD double click to edit FIELD, a dialog pops up, you can check formula 1000 * 0.030 & preview)

can you replicate this bug??

Code: [Select]

(defun foo (obj x)
  (apply 'strcat
(mapcar '(lambda (a b)
    (strcat a
    "%<\\AcExpr ("
    (rtos (float x) 2 0)
    " * %<\\AcObjProp Object(%<\\_ObjId "
    (itoa (vla-get-objectid obj))
    ">%).Delta \\f \"%lu2%pt"
    b
    "%pr8\">%"
    ") \\f \"%lu2%pt"
    b
    "%qf1%pr0\">%"
    " \n"
    )
  )
'("dX " "dY ")
'("1" "2")
)
  )
)


test delta x=0.03 y=-0.04
Code: [Select]


(and (setq pt (getpoint "\nSpecify point.. "))
        (setq en (entmakex (cons '(0 . "LINE")
   (mapcar
                                    '(lambda (a b)
                                           (cons a (mapcar '+ pt b))
                                        )
          '(10 11)
                  '((0. 0.) (0.03 -0.04))
     )
     )
         )
  )
 
  (entmakex
   (list '(0 . "MTEXT")
          '(100 . "AcDbEntity")
          '(100 . "AcDbMText")
           (cons 40 (getvar 'textsize))
           (cons 10 pt)
           (cons 1 (foo (vlax-ename->vla-object en) 1000.) ))
    )
  )



need some comparison

eg: xxxcad/20xx/winxx
dX ? ? ? ?
dY ? ? ? ?


or something else?


if there's bug, any solution?

thanks

« Last Edit: April 04, 2020, 10:15:38 AM by hanhphuc »
( apply 'equal "hp" "happy" "hạnh phúc" "ハッピー" "幸福" "행복" ) ; error: too many arguments

Marc'Antonio Alessi

  • Swamp Rat
  • Posts: 1451
  • Marco
Re: FIELD Bugs in windows x64
« Reply #1 on: April 04, 2020, 05:10:28 AM »
I have not tested your functions but I have a similar problem only with BricsCAD (tested in V19-20). It's not a Windows 64 problem.

hanhphuc

  • Newt
  • Posts: 64
Re: FIELD Bugs in windows x64
« Reply #2 on: April 04, 2020, 11:39:57 AM »
Thanx for the input. .
perhaps Bricscad has a bit different in field formula format?

Line's delta properties, unlike length & thickness properties can convert f* expression,  eg: f x 1000
"%<\\AcObjProp.16.2 Object(%<\\_ObjId 659556896>%).Length \\f \"%lu2%pr0%ct8[1000]%ps[X= ,]\">%"


same format doesn't work for delta..
"%<\\AcObjProp.16.2 Object(%<\\_ObjId 659556896>%).Delta \\f \"%lu2%pr0%ct8[1000]%ps[X= ,]%pt1\">%"











« Last Edit: April 05, 2020, 03:19:51 AM by hanhphuc »
( apply 'equal "hp" "happy" "hạnh phúc" "ハッピー" "幸福" "행복" ) ; error: too many arguments

Marc'Antonio Alessi

  • Swamp Rat
  • Posts: 1451
  • Marco
Re: FIELD Bugs in windows x64
« Reply #3 on: April 04, 2020, 12:49:06 PM »
The formula is the same, I use this:
(strcat "%<\\AcObjProp Object(%<\\_ObjId " (itoa (vla-get-ObjectID AtrObj)) ">%).TextString>%")
It is a bug, tested on V15 up to V20.  :-(

roy_043

  • Water Moccasin
  • Posts: 1895
  • BricsCAD 18
Re: FIELD Bugs in windows x64
« Reply #4 on: April 05, 2020, 02:50:29 AM »
The formula is the same, I use this:
(strcat "%<\\AcObjProp Object(%<\\_ObjId " (itoa (vla-get-ObjectID AtrObj)) ">%).TextString>%")
It is a bug, tested on V15 up to V20.  :-(
This works fine for me in V18.

Can't comment on the OP's problem. In V18 the code does not create an mtext with a field.

hanhphuc

  • Newt
  • Posts: 64
Re: FIELD Bugs in windows x64
« Reply #5 on: April 05, 2020, 04:16:25 AM »
The formula is the same, I use this:
(strcat "%<\\AcObjProp Object(%<\\_ObjId " (itoa (vla-get-ObjectID AtrObj)) ">%).TextString>%")
It is a bug, tested on V15 up to V20.  :-(

your above field expr is fine, though like control chr "\\P" (new paragraph) eg: "123\\P456"
in field "\\P" displayed as string, i don't think its a bug.



The formula is the same, I use this:
(strcat "%<\\AcObjProp Object(%<\\_ObjId " (itoa (vla-get-ObjectID AtrObj)) ">%).TextString>%")
It is a bug, tested on V15 up to V20.  :-(
This works fine for me in V18.

Can't comment on the OP's problem. In V18 the code does not create an mtext with a field.

thanks @Roy, perhaps your are right.

but not only Briscad, i got a friend pm tested on AC2013,
it seems different bugs ( in delta properties )

dX 302F99E204t1
dY -402F99E204t2

not sure latest 2020 has the same issue?

Acad
2007 ok
2013 long suffix
2020 

Bcad
v15-v19 code does not create an mtext with a field





( apply 'equal "hp" "happy" "hạnh phúc" "ハッピー" "幸福" "행복" ) ; error: too many arguments

Marc'Antonio Alessi

  • Swamp Rat
  • Posts: 1451
  • Marco
Re: FIELD Bugs in windows x64
« Reply #6 on: April 06, 2020, 03:32:05 AM »
hanhphun, roy_043, I am attaching 2 DWg examples  BricsCAD V18 and AutoCAD 2013 created with the code I posted. Thanks.

Marc'Antonio Alessi

  • Swamp Rat
  • Posts: 1451
  • Marco
Re: FIELD Bugs in windows x64
« Reply #7 on: April 06, 2020, 03:58:24 AM »
@hanhphun, the pictures show what i get with your code:

Marc'Antonio Alessi

  • Swamp Rat
  • Posts: 1451
  • Marco
Re: FIELD Bugs in windows x64
« Reply #8 on: April 06, 2020, 04:58:51 AM »
About 32-bit & 64-bit systems, see this  (thanks to Lee Mac)
Code: [Select]
;; ObjectID  -  Lee Mac
;; Returns a string containing the ObjectID of a supplied VLA-Object
;; Compatible with 32-bit & 64-bit systems
(defun LM:ObjectID ( obj )
    (eval
        (list 'defun 'LM:ObjectID '( obj )
            (if
                (and
                    (vl-string-search "64" (getenv "PROCESSOR_ARCHITECTURE"))
                    (vlax-method-applicable-p (vla-get-utility (LM:acdoc)) 'getobjectidstring)
                )
                (list 'vla-getobjectidstring (vla-get-utility (LM:acdoc)) 'obj ':vlax-false)
               '(itoa (vla-get-objectid obj))
            )
        )
    )
    (LM:ObjectID obj)
)
(defun LM:acdoc nil
    (eval (list 'defun 'LM:acdoc 'nil (vla-get-activedocument (vlax-get-acad-object))))
    (LM:acdoc)
)

hanhphuc

  • Newt
  • Posts: 64
Re: FIELD Bugs in windows x64
« Reply #9 on: April 06, 2020, 06:59:13 AM »
@hanhphun, the pictures show what i get with your code:

thanks Marc'Antonio for testing

looks like your ACAD got covid-15  :-)

did you try double click the field, dialog pops up?

hanhphun, roy_043, I am attaching 2 DWg examples  BricsCAD V18 and AutoCAD 2013 created with the code I posted. Thanks.

i tested your "AutoCAD2013Field.dwg" it's fine Bricscad v19 (Field updated after REGEN)
but "AutoCAD2013Field.dwg" in "BricsCAD18Field.dwg" it displayed as normal string!

objectID x86 x64 AFAIK both identical integer. maybe there's something not explored yet ?
« Last Edit: April 06, 2020, 08:38:54 AM by hanhphuc »
( apply 'equal "hp" "happy" "hạnh phúc" "ハッピー" "幸福" "행복" ) ; error: too many arguments

Marc'Antonio Alessi

  • Swamp Rat
  • Posts: 1451
  • Marco
Re: FIELD Bugs in windows x64
« Reply #10 on: April 06, 2020, 08:33:04 AM »
looks like your ACAD got covid-15  :-)
Covid-13 ... :tickedoff:

did you try double click the field, dialog pops up?
AutoCAD is OK, with BricsCAD I get only "dx"...
 :?