TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Oak3s on July 28, 2010, 05:28:41 PM

Title: Create New CUI
Post by: Oak3s on July 28, 2010, 05:28:41 PM
Is it possible to create a new cui via lisp? With help from those here I have a routine to set the main cui and the enterprise cui. What I would like to do create a fresh/blank cui and then set that as the main. Any help is appreciated.
Title: Re: Create New CUI
Post by: Patrick_35 on July 30, 2010, 10:46:51 AM
Hi

Yes, simply create a text file with the extension mns and then using a partial menu's

@+
Title: Re: Create New CUI
Post by: Oak3s on July 30, 2010, 10:04:18 PM
 ^-^ That was awesome! I dont know why...but it was really cool. Thank you.
Title: Re: Create New CUI
Post by: Oak3s on August 03, 2010, 05:12:13 PM
Can you create a txt file through lisp without specifying location or file name? I am thinking getfiled but I dont want the dialog box.
Title: Re: Create New CUI
Post by: Lee Mac on August 03, 2010, 05:21:27 PM
Yes - I sometimes create Config/DCL/LISP files in my LISP programs - just writing them to a support path. - You needn't prompt the user for a path if you can locate one yourself. :-)
Title: Re: Create New CUI
Post by: Oak3s on August 03, 2010, 05:39:02 PM
Yes - ...... - You needn't prompt the user for a path if you can locate one yourself. :-)
Thanks but I am a little confused.

Can you do this with getfiled? How?
Title: Re: Create New CUI
Post by: Lee Mac on August 03, 2010, 05:42:04 PM
Yes - ...... - You needn't prompt the user for a path if you can locate one yourself. :-)
Thanks but I am a little confused.

Can you do this with getfiled? How?

GetFileD(ialog) is purely for prompting for a filename selection.

For a temporary file, look into the vl-filename-mktemp function  :-)

Title: Re: Create New CUI
Post by: Oak3s on August 03, 2010, 07:26:02 PM
Thanks for the help but I am having little luck with vl-filename-mktemp. Would I have to mktemp and then copy that?

For now I have resorted to copying a blank.mnl file from another location. :(
Title: Re: Create New CUI
Post by: Lee Mac on August 04, 2010, 02:11:59 PM
If you know the directory you want to write to, just use 'open' to write the file.  :?
Title: Re: Create New CUI
Post by: Oak3s on August 04, 2010, 05:49:00 PM
First, I meant copy a blank mns...not mnl...and

 :oops: I didnt know about open  :oops: Now I do...that sure makes things easier :) Thanks a lot Lee.
Title: Re: Create New CUI
Post by: Lee Mac on August 04, 2010, 06:20:00 PM
First, I meant copy a blank mns...not mnl...and

 :oops: I didnt know about open  :oops: Now I do...that sure makes things easier :) Thanks a lot Lee.

You're welcome Oak  :-)