Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Home
Help
Login
Register
TheSwamp
»
Code Red
»
AutoLISP (Vanilla / Visual)
»
Topic:
Partial CUI Load ACADDOC
« previous
next »
Print
Pages: [
1
] |
Go Down
Author
Topic: Partial CUI Load ACADDOC (Read 1059 times)
0 Members and 1 Guest are viewing this topic.
capsochist
Newt
Posts: 24
Partial CUI Load ACADDOC
«
on:
September 22, 2020, 05:27:19 PM »
Hi there,
I have the following block of code in my ACADDOC.lsp file which checks a few system variables upon startup. I am wondering how to add a block of code that checks whether a Partial CUI is loaded at startup in the same way as opposed to writing (
Code - Auto/Visual Lisp:
[Select]
command
"menuload"
"acad"
) which doesn't check that it is loaded, but instead just force loads it regardless.
Code - Auto/Visual Lisp:
[Select]
(
foreach
sys
'
(
(
pdfshx
0
)
(
epdfshx
0
)
(
imageframe
2
)
(
pdfframe
2
)
(
pellipse
1
)
(
fontalt
"arial"
)
)
(
if
(
getvar
(
car
sys
)
)
(
apply
'
setvar
sys
)
)
)
Logged
BIGAL
Swamp Rat
Posts: 1420
40 + years of using Autocad
Re: Partial CUI Load ACADDOC
«
Reply #1 on:
September 22, 2020, 08:17:06 PM »
To quote Autodesk.
(menugroup groupname)
If groupname matches a loaded menu group name, the function returns the groupname string; otherwise, it returns nil.
Write a If to check if not then menuload.
Logged
A man who never made a mistake never made anything
capsochist
Newt
Posts: 24
Re: Partial CUI Load ACADDOC
«
Reply #2 on:
September 22, 2020, 08:55:47 PM »
this seems to work...
Code - Auto/Visual Lisp:
[Select]
(
if
(
not
(
menugroup
"acad"
)
)
(
progn
(
command
"menuload"
"acad"
)
)
)
«
Last Edit: September 22, 2020, 09:11:01 PM by capsochist
»
Logged
Print
Pages: [
1
] |
Go Up
« previous
next »
TheSwamp
»
Code Red
»
AutoLISP (Vanilla / Visual)
»
Topic:
Partial CUI Load ACADDOC