.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

cant start sheetsetmanager?

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
stefanveurink68AXD
521 Views, 4 Replies

cant start sheetsetmanager?

I'm doing this simple code: 

 

using ACSMCOMPONENTS23Lib;

private void CreateSheetSet()
        {
            AcSmSheetSetMgr manager = new AcSmSheetSetMgr();
            ....
            ....
        }


 

Immediatly on first line it gives me error: 

 

An exception of type 'System.Runtime.InteropServices.COMException' occurred in mscorlib.dll but was not handled in user code

Additional information: Retrieving the COM class factory for component with CLSID {5E7291E1-0D0D-4489-A8A0-9A1A1892E5CF} failed due to the following error: 80040111 ClassFactory cannot supply requested class (Exception from HRESULT: 0x80040111 (CLASS_E_CLASSNOTAVAILABLE)).

 

Any idea what I'm doing wrong?

4 REPLIES 4
Message 2 of 5

By the way I also got another problem don't know whats going wrong these days:

 

private void verwijderxrefs(string path)
        {
            Database db = new Database();
            using (db)
            {
                db.ReadDwgFile(path, System.IO.FileShare.Read, false, "");

gives me een efiler error at the last shown line?

 

Could it be it has to do with my company server or security or something like that? Or IT-department is very enthusiastic and change settings all the time so wouldn't surprise me (lol). Never had an error at the first line of my code.... now theres 2 in one week. 

Message 3 of 5

You did not mention which version of AutoCAD the code is running against. Do you have multiple versions of AutoCAD installed? AcSmComponents23Lib only works with AutoCAD version 23.x (2019/23.0 and 2020/23.1).

Norman Yuan

Drive CAD With Code

EESignature

Message 4 of 5

When creating a Database instance for reading existing DWG file, you should use the overload constructor

 

Database db = new Database(false, true);

 

That is, you do not want the new Database is created with default drawing to be built in it (the first argument as false), and the Database is to be used as side database without a Document associated (the second argument as true).

 

This would have nothing with whatever your IT people did, I think.

 

Norman Yuan

Drive CAD With Code

EESignature

Message 5 of 5

Ah ow really? Yes then that is the problem Ive got autocad 2018 en civil2020.

 

The code is part of a plugin. I guess this means I have to compile 2 different versions, one for the 2020 and one for the 2018? This is first time this is the case then, till now it was working on both versions just fine.

 

Anyways thanks, ill check it out next monday. 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report