0 Members and 1 Guest are viewing this topic.
I know that when CadWORX is being loaded up with AutoCAD it's done via command line arguments which are embedded in the shortcut that launches. Is this just an argument that gets passed to the commandline?
private void button1_Click(object sender, EventArgs e) { const string progID = "AutoCAD.Application"; AcadApplication acApp = null; try { acApp =(AcadApplication)Marshal.GetActiveObject(progID);} catch { try { Type acType =Type.GetTypeFromProgID(progID); acApp = (AcadApplication)Activator.CreateInstance(acType,true); } catch { MessageBox.Show("Cannot create object of type \"" + progID + "\""); } } if (acApp != null) { acApp.Visible = true; acApp.ActiveDocument.SendCommand("(load \"nameof.lsp\")" + "\n"); } }
I was just keeping in mind that he doesn't want this to be automatically loaded in case someone else jumps on the machine.Since I don't know defun from da fun in the lisp world... What is so significant about when Acad.lsp and AcadDoc.lsp load? Thanks
Quote from: WILL HATCH on March 08, 2013, 11:26:12 PMI was just keeping in mind that he doesn't want this to be automatically loaded in case someone else jumps on the machine.Since I don't know defun from da fun in the lisp world... What is so significant about when Acad.lsp and AcadDoc.lsp load? ThanksIf the LISP was loaded by the Script, and the Script were being loaded from the /b switch In the application icon's Target Property, then anyone who uses that application icon gains access to said LISP. As for Acad.lsp, and AcadDoc.lsp, these are user-defined files which are automatically loaded at startup, and drawing open respectively (by default) if found within the SFSP.