vla-GetCustomScale in BricsCAD

Hi all,

I have a strange problem with GetCustomScale method.

I need to get from LISP level a layout scale. This seems to be pretty simple with such code:

[code]

(setq #doc (vla-get-ActiveDocument (vlax-get-acad-object)))

(setq acLayoutObj (vla-get-ActiveLayout #doc))

(vla-GetCustomScale acLayoutObj 'nom 'den)

[/code][

It works well in AutoCAD - but in BricsCAD I get such message:

[code]

; error : Automation Error. Method [CUSTOMSCALE] not available

[/code]

So such method is unavailable? Strange, because when I try this:

[code]

: (vlax-method-applicable-p acLayoutObj 'GetCustomScale)
T

[/code]

I get TRUE not FALSE.

Could anyone help me with this?

Or maybe anyone has a different way of obtaining the layout scale?

Warzyk

Comments

  • This will work on V13 and V14.1.11 (but not on earlier V14 versions):
    [code](setq elist (entget (vlax-vla-object->ename acLayoutObj)))
    (setq scale (/ (cdr (assoc 142 elist)) (cdr (assoc 143 elist))))[/code]
  • We will fix this ... likely that function is declared in COM TypeLib (.tlb file), but implementation seems to have an issue;
    will be no problem to fix.
  • Thank You both for quick answer.
  • Just fixed ... was a typo issue : "CustomSace" instead of "GetCustomScale" was queried from COM,
    which then must fail ... indicated by the error message :-)
    Thanks for pointing us to this issue.
  • Just fixed ... was a typo issue : "CustomScale" instead of "GetCustomScale" was queried from COM,
    which then must fail ... indicated by the error message :-)
    Thanks for pointing us to this issue.
This discussion has been closed.