Community
I have the following code which had worked on C3D 2020 fine but now that we have upgraded to C3D 2022 it seems not to work at all, if I break it up and run it individually piece by piece it works, but as a lisp routine it just doesnt.
(vl-load-com is loaded elsewhere)
Any ideas would be of help
(defun C:ifade (/ mycurtab imgss n featobj imgssobj)
(if (not (= (setq mycurtab (getvar "ctab")) "Model"))
(setvar "Tilemode" 1)
)
(command "regen")
(setq imgss (ssget "x" (list '(0 . "*image"))))
(if imgss
(repeat (setq n (sslength imgss)); then
(princ (strcat "Images processing: " (itoa n) \n))
(setq featobj (vlax-ename->vla-object (ssname imgss (setq n (1- n)))))
(setq imgssobj (vlax-vla-object->ename featobj))
(command "._imageadjust" imgssobj "" "F" "50")
(princ (strcat "\n" imgssobj " set fade to 50%\n"))
); repeat [then]
(princ "\nSelection set for image not found\n")
)
(command "regen")
(if (not (= mycurtab "Model"))
(setvar "ctab" mycurtab)
)
)
PSI have resorted to running this as a copy past into the command prompt.
(setq imgss (ssget "x" '((0 . "*IMAGE"))))
(repeat (setq n (sslength imgss)); then
(princ (strcat "\nImages processing: " (itoa n) "\n"))
(setq featobj (vlax-ename->vla-object (ssname imgss (setq n (1- n)))))
(setq imgssobj (vlax-vla-object->ename featobj))
(command "._imageadjust" imgssobj "" "F" "50")
)
Is there a reason that you have this line commented out?
;(setq imgss (ssget "x" (list '(0 . "*image"))))
Can't find what you're looking for? Ask the community or share your knowledge.