Hi mid-awe,
Using 'TBLOBJNAME' function to get the block ename, and using it as argument to the 'VLAX-ENAME->VLA-OBJECT' function, and dump the object proreties and the supported methods:
_$ (vlax-dump-object (VLAX-ENAME->VLA-OBJECT (TBLOBJNAME "block" "BlockName")) T)
; IAcadEntity2: AutoCAD Entity Interface
; Property values:
; Application (RO) = #<VLA-OBJECT IAcadApplication 00000001406ea1d8>
; Document (RO) = #<VLA-OBJECT IAcadDocument 000000003c25d860>
; EntityTransparency = "ByLayer"
; Handle (RO) = "23A"
; HasExtensionDictionary (RO) = 0
; Hyperlinks (RO) = #<VLA-OBJECT IAcadHyperlinks 000000003fe159f8>
; Layer = "0"
; Linetype = "ByLayer"
; LinetypeScale = 1.0
; Lineweight = -1
; Material = "ByLayer"
; ObjectID (RO) = 42
; ObjectID32 (RO) = 42
; ObjectName (RO) = "AcDbBlockBegin"
; OwnerID (RO) = 43
; OwnerID32 (RO) = 43
; PlotStyleName = "ByLayer"
; TrueColor = #<VLA-OBJECT IAcadAcCmColor 000000003fe15a50>
; Visible = -1
; Methods supported:
; ArrayPolar (3)
...
; Update ()
T
_$
we don't have the 'IsDynamicBlock' property avaliable...
We need to use the block from the block collection from the active document to acess to the 'IsDynamicBlock' property and others...
_$ (vlax-dump-object (vla-item (vla-get-blocks (vla-get-activedocument (vlax-get-acad-object))) "BlockName") T)
; IAcadBlock: A block definition containing a name and a set of objects
; Property values:
; Application (RO) = #<VLA-OBJECT IAcadApplication 00000001406ea1d8>
; BlockScaling = 1
; Comments = ""
; Count (RO) = 12
; Document (RO) = #<VLA-OBJECT IAcadDocument 000000003c25d860>
; Explodable = -1
; Handle (RO) = "217"
; HasExtensionDictionary (RO) = -1
; IsDynamicBlock (RO) = -1
; IsLayout (RO) = 0
; IsXRef (RO) = 0
; Layout (RO) = AutoCAD.Application: The property is not available in current state
; Name = "BlockName"
; ObjectID (RO) = 43
; ObjectID32 (RO) = 43
; ObjectName (RO) = "AcDbBlockTableRecord"
; Origin = (0.0 0.0 0.0)
; OwnerID (RO) = 44
; OwnerID32 (RO) = 44
; Path = AutoCAD.Application: Not applicable
; Units = 4
; XRefDatabase (RO) = AutoCAD.Application: No database
; Methods supported:
; Add3DFace (4)
...
; Unload ()
T
_$
'The sub-function is now throwing the error, and it worked before.'
It should not, post the sub-function and the code lines where you are setting variables and call the sub-function (if possible)
Henrique