Code Red > AutoLISP (Vanilla / Visual)

LISPSYS related or version related error Current settings: Object conversion=Del

(1/1)

damn:
On first run only, I get this error

"Current settings: Object conversion=Delete
Enter name of output file:
Enter name of existing block or
[= (block=output file)/* (whole drawing)] <define new drawing>:"

after code....

Draws a polyline.

Inserts a block, changes an attribute and changes a visibility state of that block.

User selects a CSV which is then read and printed to the screen.

and then it crashes on this following line.

(setq splice_text_Insert (getpoint "Specify insertion point for Splice Text: "))

Only happens on first run.
From what I've googled and confirmed it's related to the visibility change.
Only happens with 2023, 2024.
Doesn't happen with 2022 or earlier releases.
Just patched 2024,  didn't fix it.

I'm thinking for a work around to trigger the error, then continue.
Any Ideas please.

I call LM's visibility function....

;; Set Dynamic Block Visibility State  -  Lee Mac
;; Sets the Visibility Parameter of a Dynamic Block (if present) to a specific value (if allowed)
;; blk - [vla] VLA Dynamic Block Reference object
;; val - [str] Visibility State Parameter value
;; Returns: [str] New value of Visibility Parameter, else nil

(defun LM:SetVisibilityState (blk val / vis)
  (if
    (and
      (setq vis (LM:getvisibilityparametername blk))
      (member (strcase val) (mapcar 'strcase (LM:getdynpropallowedvalues blk vis)))
    )
    (LM:setdynpropvalue blk vis val)
  )
)





damn:
Have to issue the code with the bug. 
If I switch the visibility state off/on of the block before 1st run of the code, no worries.

BIGAL:
You need more than that 1 Lee-mac function for code to work.

LM:getvisibilityparametername
LM:getdynpropallowedvalues
LM:setdynpropvalue

damn:

--- Quote from: BIGAL on June 18, 2024, 06:44:16 PM ---You need more than that 1 Lee-mac function for code to work.

LM:getvisibilityparametername
LM:getdynpropallowedvalues
LM:setdynpropvalue

--- End quote ---


Yep Yep, got all them,  As I've said only get the error on 1st time run.

Navigation

[0] Message Index

Go to full version