Author Topic: vla-get-XXX help (no function definition)  (Read 226 times)

0 Members and 1 Guest are viewing this topic.


  • Bull Frog
  • Posts: 427
vla-get-XXX help (no function definition)
« on: February 16, 2019, 12:33:04 PM »
Bought "The Visual Lisp Developer's Bible, 2011 edition" last night and within the first few minutes of reading, it paid for itself.  Great piece of reference material.

Implemented dump and c:dump from the book and now having a great time exploring the properties and methods from all manner of objects.

Can someone explain why some of these property methods do not work?  TIA, Paul

Code: [Select]
;; These work
Command: (vla-get-stylename obj)
"T4 Contours 2' and 10' (EG)"
Command: (vla-get-truecolor obj)
#<VLA-OBJECT IAcadAcCmColor 0000021e7e32c3a0>

;; These do not work
Command: (vla-get-style obj)
; error: no function definition: VLA-GET-STYLE
Command: (vla-get-pointfiles obj)
; error: no function definition: VLA-GET-POINTFILES
Command: (vla-get-pointfile obj)
; error: no function definition: VLA-GET-POINTFILE
Command: (vla-get-Statistics obj)
; error: no function definition: VLA-GET-STATISTICS

Below is a partial dump for an IAeccTinSurface from C3D 2018

Code: [Select]
Command: (dump obj)
; IAeccTinSurface: IAeccTinSurface interface
; Property values:
;   Application (RO) = #<VLA-OBJECT IAeccApplication 0000021e7e407550>
;   Boundaries (RO) = #<VLA-OBJECT IAeccSurfaceBoundaries 0000021e3fdf8ab8>
;   Breaklines (RO) = #<VLA-OBJECT IAeccSurfaceBreaklines 0000021e3fdf8ff8>
;   Points (RO) = (1.54059e+06 246096.0 172.0 1.54059e+06 246094.0 172.0 ... )
;   ShowToolTip = -1
;   Statistics (RO) = #<VLA-OBJECT IAeccTinSurfaceStatistics 0000021e7e408090>
;   Style = #<VLA-OBJECT IAeccSurfaceStyle 0000021e2807ba30>
;   StyleName (RO) = "T4 Contours 2' and 10' (EG)"
;   SurfaceAnalysis (RO) = #<VLA-OBJECT IAeccSurfaceAnalysis 0000021e7e408120>
;   TrueColor = #<VLA-OBJECT IAcadAcCmColor 0000021e40570480>
;   Type (RO) = 2
;   Visible = -1
; Methods supported:
;   AddPointMultiple (1)
;   ArrayPolar (3)
;   ArrayRectangular (6)
;   Copy ()
;   CreateSnapshot ()

Lee Mac

  • Seagull
  • Posts: 12184
  • London, England
Re: vla-get-XXX help (no function definition)
« Reply #1 on: February 16, 2019, 12:36:52 PM »
Only functions pertaining to properties & methods derived from the Vanilla AutoCAD Object Model are part of the type library loaded with AutoCAD.

To access other properties & methods, you'll need to use the generic vlax-get-property & vlax-invoke-method functions respectively, e.g.:
Code: [Select]
(vlax-get-property obj 'pointfile)
Or, the undocumented vlax-get & vlax-invoke functions, which operate using Vanilla AutoLISP data types:
Code: [Select]
(vlax-get obj 'pointfile)
For more information on the differences in evaluation, refer to this post by sinc.
« Last Edit: February 16, 2019, 01:09:57 PM by Lee Mac »


  • Bull Frog
  • Posts: 427
Re: vla-get-XXX help (no function definition)
« Reply #2 on: February 16, 2019, 12:47:28 PM »
Makes sense now.  Works great.


  • Bull Frog
  • Posts: 248
  • 30 + years of using Autocad
Re: vla-get-XXX help (no function definition)
« Reply #3 on: February 17, 2019, 05:17:46 PM »
You have to take a different approach with CIV3d objects, you must open the database 1st to get inside. The database is different for every year of civ3d.

I have a number of routines, the best is change surface display via a toolbar not using toolspace,  so happy to share, please describe what your trying to do.

PS have a import point label style something that does not exist in CIV3d.
A man who never made a mistake never made anything


  • Bull Frog
  • Posts: 427
Re: vla-get-XXX help (no function definition)
« Reply #4 on: February 17, 2019, 06:17:22 PM »
Ultimate goal is to quickly set VP layer state by  being able to select items in VP.  This works fine for regular AcDb objects, but Aecc object have styles properties that need to be walked, determine plan/model/section, then get layer visibility and name.

1) User selects entities in VP which they want thawed
2) Program collects list of layer names from selected entities
  a) Aecc entity type, get 'Style property
  b) Get sub-style properties and add layer names to list if sub-style is visible
3) vplayer freeze all layers of current VP
4) vplayer thaws list of collected layers of current VP

If I could easily grep for "style" from the vlax-dump-object output, then the above would be easy to code.  But that does not appear to be possible.

Maybe looking directly at the C3D database would provide an alternative means build a list of layers that should be thawed.