*Expert Elite*
1,286 Posts
37 Kudos
Registered: ‎06-21-2004
Post 11 of 14

Re: Imports Schmimports.....Arrrrrgh!

08-10-2012 10:43 AM in reply to: btillman

The question think we need answered is what exactly do you want:


1. An archive button to archive the current drawing.

       a. Automatically archive when saved

       b. Only when prompted to do so.

       c. Manual archive only


2. Archive an entire project at a time.

       a. Archive entire project

       b. Archive only drawing files.


Are you going to allow the user to do this or will someone else.


Do you need the program to run in AutoCAD? How are going to handle files in use?


If your going to Queue the files you can store all this info into the systems registry / text file / database

and then build and export the files in the queue and a predetermined time.

You need to be very clear about the steps you expect the program to do.


(defun botsbuildbots() (botsbuildbots))
*Expert Elite*
753 Posts
54 Kudos
Registered: ‎02-13-2008
Post 12 of 14

Re: Imports Schmimports.....Arrrrrgh!

08-10-2012 12:40 PM in reply to: btillman

If I've got my head wrapped around this correctly, you are not going to be able to have AutoCAD save the Drawing to the final Archive location, because AutoCAD will not be running under the proper identity to perform the save, so AutoCAD will have to save the drawing in the working location, then your separate program will be fired off under the different identity, and copy (or move) the file to the Archive location.


All this is doable.  You might not even need a .NET program to run in AutoCAD.  You can put a save and a shell execute into the button code, but I'm not sure how you are planning on getting the .EXE running under different credentials.  I believe there is a way to do it in .NET code, but I had one chance to look into a couple of years ago, and about one day to play around with it, and while my code executed, it did not execute under the admin credentials like I was trying to make it, so we used a different solution.


This migh tgive me an excuse to look into it again. :smileywink:

Dave O.                                                                  Sig-Logos32.png
Valued Contributor
69 Posts
1 Kudo
Registered: ‎07-25-2012
Post 13 of 14

Re: Imports Schmimports.....Arrrrrgh!

08-10-2012 01:58 PM in reply to: chiefbraincloud

Yes, that's the idea. I plan on having the user click a menu choice which will startapp a separate .NET exe. And you're also right the AutoCAD will not be running with the proper credentials to handle the file save. Thus the need for a stand-alone EXE.


For example, I have a custom menu in all the users' setup now and one of the choices is to enter a new drawing into an Access database. The users enjoy this very much because it controls the environment and they can't hack up the database. It launches a stand-alone exe which is a form they use and it allows the get the next drawing sequence number as well as enter data about their new drawing. And they never have to run Access at all. It works slick.


I'm attempting the same thing here. Again on the surface it looks whack-o but there really is a method to the madness. I will post back later when I get to my home office. Thanks again, I really appreciate all the tips and advice.


Distinguished Mentor
796 Posts
126 Kudos
Registered: ‎07-30-2008
Post 14 of 14

Re: Imports Schmimports.....Arrrrrgh!

08-12-2012 04:04 AM in reply to: btillman

Check out the Autodesk developer Network page here http://usa.autodesk.com/adsk/servlet/index?siteID=123112&id=1911627


It has links to the 2013 dot net training labs and other 2013 specific documentation.

If this fixed your issue, click on "Accept as Solution"

Andrew Puller
Maitland, NSW, Australia
Windows 7 Enterprise 64bit
Intel core i7 2600 @ 3.40 GHz with 16GB Ram
Civil 3d 2013 64bit
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post