Message 1 of 7
AutoCAD running in .NET Windows Service

Not applicable
03-10-2006
12:54 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I posted this last night in the VBA group,
found the .NET group this morning (more suitable), so re-posted it here.
Hi there all,
I've got one for the .NET pro's and old hand COM programmers among you.
I have written a Windows Service (written in VB.NET in VS2003) which periodically scans user nominated directory structures and creates/updates PDF files and associated webpages for Intranet users on a clients network to access drawings (and other docs) via a website.
The Service calls (vanilla) AutoCAD 2006 to open the drawings read-only, form up Index entries from the Attributed Title blocks and create PDF's for linking.
This Service works well when installed and run on the Development Machine - which is an XP SP2 Laptop.
The problem is when the Service is installed on our Server which runs Windows Small Business Server 2003 SP1 (AutoCAD is also installed on the server along with the other necessary components).
The call to create the AutoCAD.Application using:-
AcadApp = CType(CreateObject("AutoCAD.Application.16"), AcadApplication)
fails with a "Cannot create ActiveX component" error.
the Service is designed to run under a dedicated user account (it needs this to access network shares on other servers)
I have trawled the web literally for hours looking for clues, and have found many possible related issues all centered around permissions and DCOM.
The Service has been run under my user account (has full admin rights, and works fine on the Development Machine), the Local system account and the builtin admin account - all produce the exact same error.
I have tried repairing the AutoCAD install thinking that it might have been damaged and uninstalling and re-installing it and it still refuses to budge!
I have also manually added my user account to the various Security permissions in the Component Services/..../AutoCAD Application console, but this also has absolutely no effect.
Arrrrrrrgh! 6 months of after hours slog and I'm this close **fingers held very close together...** but no cigar!
Can any of you COM/.NET gurus shed any light on this issue?
As I've mentioned before, the whole thing runs sweetly on the dev machine, but I don't really want to donate it to my clients!
Any help much appreciated.
Regards
Glenn.
found the .NET group this morning (more suitable), so re-posted it here.
Hi there all,
I've got one for the .NET pro's and old hand COM programmers among you.
I have written a Windows Service (written in VB.NET in VS2003) which periodically scans user nominated directory structures and creates/updates PDF files and associated webpages for Intranet users on a clients network to access drawings (and other docs) via a website.
The Service calls (vanilla) AutoCAD 2006 to open the drawings read-only, form up Index entries from the Attributed Title blocks and create PDF's for linking.
This Service works well when installed and run on the Development Machine - which is an XP SP2 Laptop.
The problem is when the Service is installed on our Server which runs Windows Small Business Server 2003 SP1 (AutoCAD is also installed on the server along with the other necessary components).
The call to create the AutoCAD.Application using:-
AcadApp = CType(CreateObject("AutoCAD.Application.16"), AcadApplication)
fails with a "Cannot create ActiveX component" error.
the Service is designed to run under a dedicated user account (it needs this to access network shares on other servers)
I have trawled the web literally for hours looking for clues, and have found many possible related issues all centered around permissions and DCOM.
The Service has been run under my user account (has full admin rights, and works fine on the Development Machine), the Local system account and the builtin admin account - all produce the exact same error.
I have tried repairing the AutoCAD install thinking that it might have been damaged and uninstalling and re-installing it and it still refuses to budge!
I have also manually added my user account to the various Security permissions in the Component Services/..../AutoCAD Application console, but this also has absolutely no effect.
Arrrrrrrgh! 6 months of after hours slog and I'm this close **fingers held very close together...** but no cigar!
Can any of you COM/.NET gurus shed any light on this issue?
As I've mentioned before, the whole thing runs sweetly on the dev machine, but I don't really want to donate it to my clients!
Any help much appreciated.
Regards
Glenn.