.NET

.NET

Reply
Valued Contributor
swaywood
Posts: 91
Registered: ‎08-22-2013
Message 1 of 5 (181 Views)

how to know the lisp file was loaded in current doc by c#.net

181 Views, 4 Replies
03-05-2014 06:47 AM

could anyone tell me how to judge whether the lisp file was loaded in current doc by c#.net?

thks

Valued Mentor
fieldguy
Posts: 382
Registered: ‎03-31-2005
Message 2 of 5 (176 Views)

Re: how to know the lisp file was loaded in current doc by c#.net

03-05-2014 06:59 AM in reply to: swaywood

Is it a lisp created by you?  If so, you could set a variable in the lisp routine like USERS1 (string).

Valued Contributor
swaywood
Posts: 91
Registered: ‎08-22-2013
Message 3 of 5 (171 Views)

Re: how to know the lisp file was loaded in current doc by c#.net

03-05-2014 07:04 AM in reply to: fieldguy
could you give more details?
my lisp file maybe a lisp or vlx
Valued Mentor
fieldguy
Posts: 382
Registered: ‎03-31-2005
Message 4 of 5 (166 Views)

Re: how to know the lisp file was loaded in current doc by c#.net

03-05-2014 07:09 AM in reply to: swaywood

In your lisp you could do something like:

(setvar USERS1 "this lisp is loaded")

Then in your C# code you could use something like:

string checkvar = Application.GetSystemVariable("USERS1")

If USERS1 is empty, or not = "this lisp is loaded", then it's not loaded.

Valued Contributor
swaywood
Posts: 91
Registered: ‎08-22-2013
Message 5 of 5 (128 Views)

Re: how to know the lisp file was loaded in current doc by c#.net

03-06-2014 06:01 PM in reply to: fieldguy
thank you for your reply, but i can not change some of the vlx file
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.