.NET

Reply
*Expert Elite*
arcticad
Posts: 1,285
Registered: ‎06-21-2004
Message 11 of 14 (111 Views)

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*
chiefbraincloud
Posts: 753
Registered: ‎02-13-2008
Message 12 of 14 (105 Views)

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
Active Contributor
btillman
Posts: 48
Registered: ‎07-25-2012
Message 13 of 14 (99 Views)

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
andrewpuller3811
Posts: 772
Registered: ‎07-30-2008
Message 14 of 14 (82 Views)

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
Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.