Author Topic: dcl_project_import  (Read 4502 times)

0 Members and 1 Guest are viewing this topic.

jbuzbee

  • Swamp Rat
  • Posts: 851
dcl_project_import
« on: July 17, 2007, 03:25:21 PM »
Is dcl_project_import supposed to act like (dcl_project_load "MyProject" T)?

If I have a floating modeless form and open another drawing the floating form closes as if the reload flag was set on dcl_project_load.  Is this normal behavior?  If so, how should I be using the .lsp odcl file (if I'm not wrapping it in a vlx)?  I would like to just edit it by adding : (dcl_Project_Import(strcat"YWt6A9aSAACxoL . . .")) and then wrap it up in a .fas . . ..

Any thought?

Thanks,

jb
James Buzbee
Windows 8

owenwengerd

  • Bull Frog
  • Posts: 451
Re: dcl_project_import
« Reply #1 on: July 17, 2007, 03:58:21 PM »
Is dcl_project_import supposed to act like (dcl_project_load "MyProject" T)?

Yes, (dcl_project_import) always reloads the project you feed to it.  The thinking is that since the project is inline, it could only be loaded already if your code loaded it, therefore your code will always know whether it is already loaded.  Normally you would set a global variable the first time you load the project, then not load it again if that variable is set.  There may be cases where you want two instances of the same project loaded (i.e. if you want to display two simultaneous instances of the same form); for such cases, you can load/import the same project multiple times by specifying different project keys (see the optional parameters for dcl_project_load and dcl_project_import) each time.

jbuzbee

  • Swamp Rat
  • Posts: 851
Re: dcl_project_import
« Reply #2 on: July 17, 2007, 04:12:01 PM »
So do I load the project into AutoCAD or the document: meaning it doesn't need to be "imported" with each docuemnt??
James Buzbee
Windows 8

owenwengerd

  • Bull Frog
  • Posts: 451
Re: dcl_project_import
« Reply #3 on: July 17, 2007, 08:38:54 PM »
So do I load the project into AutoCAD or the document: meaning it doesn't need to be "imported" with each docuemnt??

It only needs to be imported once per AutoCAD session.  Once imported, it is available from all documents.  I guess I should clarify that "global variable" in my previous post should be "global variable stored on/in the bulletin board".

jbuzbee

  • Swamp Rat
  • Posts: 851
Re: dcl_project_import
« Reply #4 on: July 17, 2007, 10:54:13 PM »
What your saying is to set a "global variable" using vl-bb-set?

Thanks for the clarification Owen.

jb

Edit: Yep that works!  this is so cool . . ..
« Last Edit: July 18, 2007, 08:47:19 AM by jbuzbee »
James Buzbee
Windows 8