Author Topic: LM:blockreferenceboundingbox  (Read 5793 times)

0 Members and 1 Guest are viewing this topic.

Marc'Antonio Alessi

  • Swamp Rat
  • Posts: 1453
  • Marco
Re: LM:blockreferenceboundingbox
« Reply #30 on: March 02, 2021, 10:42:44 AM »
try with vlax-method-applicable-p      (?)

domenicomaria

  • Swamp Rat
  • Posts: 725
Re: LM:blockreferenceboundingbox
« Reply #31 on: March 02, 2021, 11:16:22 AM »
Code - Auto/Visual Lisp: [Select]
  1. (defun c:k ()
  2.         (vl-load-com)
  3.  
  4.         (setq x-en (car (entsel) ) )
  5.         (print x-en) (princ)
  6.  
  7.         (setq x-el (entget x-en) )
  8.         (print x-el) (princ)
  9.  
  10.         (setq x-obj (vlax-ename->vla-object x-en) )
  11.  
  12.         (setq v-m-a-p (vlax-method-applicable-p x-obj 'explode) )
  13.         (print v-m-a-p) (princ)
  14.        
  15.    ;    (setq v-c-a-e-p (vl-catch-all-error-p (vl-catch-all-apply 'vlax-invoke (list x-obj "Explode") ) ) )
  16.        
  17.         (setq obj-lst (vlax-invoke x-obj "Explode") )
  18.         (print obj-lst) (princ)
  19.  
  20.         (foreach x-obj obj-lst (print (vla-get-ObjectName x-obj) ) (princ) )
  21. )

. . . however it works !
It explodes a copy of the insert !
. . .

Maybe it depends from the Acad version.

Where I work, they installed an Acad 2020 version.
« Last Edit: March 02, 2021, 11:26:30 AM by domenicomaria »

Marc'Antonio Alessi

  • Swamp Rat
  • Posts: 1453
  • Marco
Re: LM:blockreferenceboundingbox
« Reply #32 on: March 02, 2021, 04:23:16 PM »
Tested also in 2020 > if the block is not uniform scaled  the result of explode is nil ...

domenicomaria

  • Swamp Rat
  • Posts: 725
Re: LM:blockreferenceboundingbox
« Reply #33 on: March 02, 2021, 10:32:37 PM »
Tested also in 2020 > if the block is not uniform scaled  the result of explode is nil ...
while in a precedent version, is the result of explode is an object list ?
yes !

and is there something such as INITCOMMANDVERSION  that could change this behaviour ?

domenicomaria

  • Swamp Rat
  • Posts: 725
Re: LM:blockreferenceboundingbox
« Reply #34 on: March 02, 2021, 11:53:31 PM »
I sent the defun K
to a friend of mine, that uses BricsCAD.
(I don't know what version)

and obj-lst is a list of objects !

Marc'Antonio Alessi

  • Swamp Rat
  • Posts: 1453
  • Marco
Re: LM:blockreferenceboundingbox
« Reply #35 on: March 04, 2021, 03:33:18 AM »
I sent the defun K
to a friend of mine, that uses BricsCAD.
(I don't know what version)

and obj-lst is a list of objects !
:yes: tested in BricsCAD V14 and 20:
Code: [Select]
(defun c:kkkk ()
  (print (setq x-en (car (entsel))))
  (print (setq x-el (entget x-en)))
  (setq x-obj (vlax-ename->vla-object x-en))
  (print (setq v-m-a-p (vlax-method-applicable-p x-obj 'explode)))
  (print (setq obj-lst (vlax-invoke x-obj "Explode")))
  (foreach x-obj obj-lst (print (vla-get-ObjectName x-obj)))
  (princ)
)
: KKKK
Select entity:
<Entity name: 3a719520>
((-1 . <Entity name: 3a719520>) (0 . "INSERT") (5 . "87") (330 . <Entity name: 6ce56170>) (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 . "0") (62 . 1) (370 . -1) (100 . "AcDbBlockReference") (2 . "arrows8") (10 394.622585423474 58.8644608776229 0.0) (41 . 1.0) (42 . 0.5) (43 . 0.5) (50 . 0.0) (70 . 0) (71 . 0) (44 . 0.0) (45 . 0.0) (210 0.0 0.0 1.0))
T
(#<VLA-OBJECT IAcadHatch2 000000006CE57C00> #<VLA-OBJECT IAcadLine 000000006CE58780> #<VLA-OBJECT IAcadLine 000000006CE58200> #<VLA-OBJECT IAcadLine 000000006CE58C00> #<VLA-OBJECT IAcadLine 000000006CE57D80> #<VLA-OBJECT IAcadEllipse 000000006CE56F80> #<VLA-OBJECT IAcadLine 000000006CE58500> #<VLA-OBJECT IAcadEllipse 000000006CE57300>)
"AcDbHatch"
"AcDbLine"
"AcDbLine"
"AcDbLine"
"AcDbLine"
"AcDbEllipse"
"AcDbLine"
"AcDbEllipse"
:
: KKKK
Select entity:
<Entity name: 3a7195a0>
((-1 . <Entity name: 3a7195a0>) (0 . "INSERT") (5 . "84") (330 . <Entity name: 6ce56170>) (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 . "0") (62 . 1) (370 . -1) (100 . "AcDbBlockReference") (2 . "arrows8") (10 390.534090981255 55.2902371436784 0.0) (41 . 0.5) (42 . 0.5) (43 . 0.5) (50 . 5.14332144945154) (70 . 0) (71 . 0) (44 . 0.0) (45 . 0.0) (210 0.0 0.0 1.0))
T
(#<VLA-OBJECT IAcadHatch2 000000006CE57E80> #<VLA-OBJECT IAcadLWPolyline 000000006CE58A80>)
"AcDbHatch"
"AcDbPolyline"
:
: KKKK
Select entity:
<Entity name: 3a7198e0>
((-1 . <Entity name: 3a7198e0>) (0 . "LWPOLYLINE") (5 . "7F") (102 . "{ACAD_REACTORS") (330 . <Entity name: 3a7198a0>) (102 . "}") (330 . <Entity name: 6ce56170>) (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 . "0") (6 . "ACAD_ISO03W100") (62 . 253) (48 . 0.007069650490151) (370 . 25) (100 . "AcDbPolyline") (90 . 7) (70 . 1) (43 . 0.030574411664588) (38 . 0.0) (39 . 0.0) (10 390.884399234151 50.8307665167475) (40 . 0.030574411664588) (41 . 0.030574411664588) (42 . 0.0) (91 . 0) (10 390.897503827103 51.1304801628225) (40 . 0.030574411664588) (41 . 0.030574411664588) (42 . 0.0) (91 . 0) (10 390.270910292456 50.3143909469705) (40 . 0.030574411664588) (41 . 0.030574411664588) (42 . 0.0) (91 . 0) (10 390.831980862344 49.6319119324476) (40 . 0.030574411664588) (41 . 0.030574411664588) (42 . 0.0) (91 . 0) (10 390.845085455296 49.9316255785226) (40 . 0.030574411664588) (41 . 0.030574411664588) (42 . -0.198303615254713) (91 . 0) (10 391.743449272824 49.3689487916544) (40 . 0.030574411664588) (41 . 0.030574411664588) (42 . 0.0) (91 . 0) (10 392.614490304417 50.194350222039) (40 . 0.030574411664588) (41 . 0.030574411664588) (42 . 0.195791166312802) (91 . 0) (210 0.0 0.0 1.0))
T
(#<VLA-OBJECT IAcadLine 000000006CE54B50> #<VLA-OBJECT IAcadLine 000000006CE54CD0> #<VLA-OBJECT IAcadLine 000000006CE54E50> #<VLA-OBJECT IAcadLine 000000006CE53F50> #<VLA-OBJECT IAcadArc 000000006CE54250> #<VLA-OBJECT IAcadLine 000000006CE548D0> #<VLA-OBJECT IAcadArc 000000006CE54150>)
"AcDbLine"
"AcDbLine"
"AcDbLine"
"AcDbLine"
"AcDbArc"
"AcDbLine"
"AcDbArc"

domenicomaria

  • Swamp Rat
  • Posts: 725
Re: LM:blockreferenceboundingbox
« Reply #36 on: March 04, 2021, 09:16:55 AM »
but not in Acad2020
. . .
is there no system variable
or something such as "initcommandversion"
that could change this behaviour ?

Or it is a bug ?

Marc'Antonio Alessi

  • Swamp Rat
  • Posts: 1453
  • Marco
Re: LM:blockreferenceboundingbox
« Reply #37 on: March 04, 2021, 09:53:58 AM »
but not in Acad2020
. . .
is there no system variable
or something such as "initcommandversion"
that could change this behaviour ?

Or it is a bug ?
I do not know, "initcommandversion" is only for commands...