Hello everyone,
I was trying to pull some attribute values from several block objects when I came across an error. The error itself wasn't outputing anything, so I added a "vl-catch-all-apply" function, and then I discovered the bug when I tried to display the message for the faulty code.
This issue visually reminds me of another issue (link) that was mentioned a short while back. I don't know if the issues are related or if they are just visually similiar.
Edit:
Near the end of "Test 01," below, I tried to use the "repeat" function. I simply grew tired of repeating the same entry for a new, single result and tried to quicken the pace. In the previous issue, the same value repeated itself atfter a certain point, and I seeked to see where the repeated value would occur in this test. Unfortunately, the repeat function did not perform as I had wished in the test. It repeated the same error value, but the value changed each time the function was ran. For the sake of my time, this was the point where I stopped gathering information.
Discovery Session:
< Other functions and commands > ... Command: (vlax-invoke objTemp 'getattributes) Command: (vlax-invoke objTemp 'getattributes) Command: (vlax-invoke objTemp 'getattributes) ... < Other commands, trying to get the attributes > Command: (vl-catch-all-apply 'vlax-invoke (list objTemp 'getattributes)) #<%catch-all-apply-error%> Command: (setq errVal (vl-catch-all-apply 'vlax-invoke (list objTemp 'getattributes))) #<%catch-all-apply-error%> Command: (vl-catch-all-error-p errVal) T Command: (vl-catch-all-error-message errVal) `Xq%l Command: (vl-catch-all-error-message errVal) Command: (vl-catch-all-error-p errVal) T Command: (vl-catch-all-error-message errVal) u Command: (vl-catch-all-error-message errVal) u Command: (vl-catch-all-error-message errVal) ÃøŒl Command: (vl-catch-all-error-message errVal) Command: (vl-catch-all-error-message errVal) ÀÅøŒl Command: (vl-catch-all-error-message errVal) u Command: (vl-catch-all-error-message errVal) 0ºøŒl Command: (vl-catch-all-error-message errVal) 0ºøŒl Command: (vl-catch-all-error-message errVal) àÃøŒl Command: (vl-catch-all-error-message errVal) u Command: (vl-catch-all-error-message errVal) Command: (vl-catch-all-error-message errVal) ÿÿÿÿr Command: (vl-catch-all-error-message errVal) ÿÿÿÿr ... (Repeating)
Test 01: New application
Command: Command: _RIBBON Command: (setq ActDoc (vlax-get (vlax-get-acad-object) 'ActiveDocument)) #Command: (vlax-for objTemp (vlax-get ActDoc 'Blocks)(setq objBlock objTemp)) # Command: (vlax-dump-object objBlock) ; IOdaBlock: TeighaX Interface for an additional block functionality ; Property values: ; Application = # ; BlockScaling = 1 ; Comments = "" ; Count = 9 ; Document = # ; Explodable = -1 ; Handle = "2646" ; HasExtensionDictionary = 0 ; IsDynamicBlock = 0 ; IsLayout = 0 ; IsXRef = 0 ; Layout = Error: Exception occurred.. ; Name = "Rev_Line 5" ; ObjectID = 1002918448 ; ObjectName = "AcDbBlockTableRecord" ; Origin = (0.0 0.0 0.0) ; OwnerID = 999605952 ; Path = "" ; Units = 0 ; XRefDatabase = nil ; isDependent = 0 ; isFromOverlayReference = 0 ; isResolved = 0 ; isUnloaded = 0 T Command: (vl-catch-all-apply 'vlax-invoke (list objBlock 'getattributes)) #<%catch-all-apply-error%> Command: (setq errVal (vl-catch-all-apply 'vlax-invoke (list objTemp 'getattributes))) ;<-- copy and pasted function with wrong variable "objTemp" #<%catch-all-apply-error%> Command: (vl-catch-all-error-message errVal) Error: Invalid parameter. Command: (vl-catch-all-error-message errVal) Error: Invalid parameter. (setq errVal (vl-catch-all-apply 'vlax-invoke (list objBlock 'getattributes))) ;<-- Fixed variable to "objBlock" #<%catch-all-apply-error%> Command: (vl-catch-all-error-message errVal) Command: (vl-catch-all-error-message errVal) Command: (vl-catch-all-error-message errVal) Command: (setq errVal (vl-catch-all-apply 'vlax-invoke (list objBlock 'getattributes))) #<%catch-all-apply-error%> Command: (vl-catch-all-error-p errVal) T Command: (vl-catch-all-error-message errVal) Àn"ñ Command: (vl-catch-all-error-message errVal) Command: (vl-catch-all-error-message errVal) Command: (vl-catch-all-error-message errVal) Command: «Cancel» Command: (vl-catch-all-error-message errVal) Àê¬{ø Command: (vl-catch-all-error-message errVal) Àê¬{ø Command: (vl-catch-all-error-message errVal) Command: (vl-catch-all-error-message errVal) pƹ"ñ Command: (vl-catch-all-error-message errVal) P"¶;ñ Command: (vl-catch-all-error-message errVal) r*;ñ Command: (vl-catch-all-error-message errVal) ж;ñ Command: (vl-catch-all-error-message errVal) pŸ¹"ñ Command: (vl-catch-all-error-message errVal) 01¶;ñ Command: (vl-catch-all-error-message errVal) Command: (vl-catch-all-error-message errVal) Command: (vl-catch-all-error-message errVal) Command: (vl-catch-all-error-message errVal) Command: (vl-catch-all-error-message errVal) p¶¹"ñ Command: (vl-catch-all-error-message errVal) °g*;ñ Command: (vl-catch-all-error-message errVal) pµ;ñ Command: (vl-catch-all-error-message errVal) pɹ"ñ Command: (vl-catch-all-error-message errVal) €µ;ñ Command: (vl-catch-all-error-message errVal) ж;ñ Command: (vl-catch-all-error-message errVal) W ƒñ ommand: (vl-catch-all-error-message errVal) °òµ;ñ Command: (vl-catch-all-error-message errVal) °¶;ñ Command: (vl-catch-all-error-message errVal) p´¹"ñ Command: (vl-catch-all-error-message errVal) ð*;ñ Command: (vl-catch-all-error-message errVal) ж;ñ Command: (vl-catch-all-error-message errVal) òµ;ñ Command: (vl-catch-all-error-message errVal) fž;ñ Command: (vl-catch-all-error-message errVal) Command: (vl-catch-all-error-message errVal) pŸ¹"ñ Command: (vl-catch-all-error-message errVal) ¶;ñ Command: (vl-catch-all-error-message errVal) Command: (vl-catch-all-error-message errVal) ðùµ;ñ Command: (vl-catch-all-error-message errVal) Àê¬{ø Command: (vl-catch-all-error-message errVal) Ðùµ;ñ Command: (vl-catch-all-error-message errVal) @r"ñ Command: (vl-catch-all-error-message errVal) °îµ;ñ Command: (vl-catch-all-error-message errVal) Command: (vl-catch-all-error-message errVal) Command: (vl-catch-all-error-message errVal) Command: (vl-catch-all-error-message errVal) íµ;ñ Command: (prin1 (vl-catch-all-error-message errVal)) Command: (prin1 (vl-catch-all-error-message errVal)) ñµ;ñ ñµ;ñ Command: (vl-catch-all-error-message errVal) €¼´;ñ Command: (repeat 20 (terpri)(prin1 (vl-catch-all-error-message errVal))(princ)) ;<-- Trying to quicken the pace (fails). p™¹"ñ p™¹"ñ p™¹"ñ p™¹"ñ p™¹"ñ p™¹"ñ p™¹"ñ p™¹"ñ p™¹"ñ p™¹"ñ p™¹"ñ p™¹"ñ p™¹"ñ p™¹"ñ p™¹"ñ p™¹"ñ p™¹"ñ p™¹"ñ p™¹"ñ p™¹"ñ Command: (repeat 20 (terpri)(prin1 (vl-catch-all-error-message errVal))(princ)) pnµ;ñ pnµ;ñ pnµ;ñ pnµ;ñ pnµ;ñ pnµ;ñ pnµ;ñ pnµ;ñ pnµ;ñ pnµ;ñ pnµ;ñ pnµ;ñ pnµ;ñ pnµ;ñ pnµ;ñ pnµ;ñ pnµ;ñ pnµ;ñ pnµ;ñ pnµ;ñ Command: (repeat 30 (terpri)(prin1 (vl-catch-all-error-message errVal))(princ)) 0Ù¡ƒñ 0Ù¡ƒñ 0Ù¡ƒñ 0Ù¡ƒñ 0Ù¡ƒñ 0Ù¡ƒñ 0Ù¡ƒñ 0Ù¡ƒñ 0Ù¡ƒñ 0Ù¡ƒñ 0Ù¡ƒñ 0Ù¡ƒñ 0Ù¡ƒñ 0Ù¡ƒñ 0Ù¡ƒñ 0Ù¡ƒñ 0Ù¡ƒñ 0Ù¡ƒñ 0Ù¡ƒñ 0Ù¡ƒñ 0Ù¡ƒñ 0Ù¡ƒñ 0Ù¡ƒñ 0Ù¡ƒñ 0Ù¡ƒñ 0Ù¡ƒñ 0Ù¡ƒñ 0Ù¡ƒñ 0Ù¡ƒñ 0Ù¡ƒñ Command: (vl-catch-all-error-message errVal) pIµ;ñ Command: (vl-catch-all-error-message errVal) P<¶;ñ Command: (vl-catch-all-error-message errVal) Command: (vl-catch-all-error-message errVal) Command: (vl-catch-all-error-message errVal) p«¹"ñ
