Author Topic: Trap with vla-ArrayPolar  (Read 1645 times)

0 Members and 1 Guest are viewing this topic.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Trap with vla-ArrayPolar
« on: October 22, 2010, 01:26:21 AM »

With vla-ArrayPolar the returnValue is
Quote
Variant Array (array of objects)
The array of new objects

note the word 'NEW'

So, if we want to do something like solid subtraction of a collection of arrayed objects
the original object needs to be added to the collection returned from vla-ArrayPolar

Short example :
Code: [Select]
<.. snip ..>
  (setq ObjArray (vla-ArrayPolar
                   extObj
                   flg_hqty
                   (* pi 2)
                   (vlax-3d-Point p1w)
                 )
  )
  (foreach penetration (cons extObj (safearray-value (variant-value ObjArray)))
    (vla-boolean bodyObj acsubtraction penetration)
  )
<.. snip ..>

kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.