Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results forย 
Showย ย onlyย  | Search instead forย 
Did you mean:ย 

How to read file properties Inventor (ipt. idw. dwg) of a web application.

4 REPLIES 4
Reply
Message 1 of 5
prixodkomv
667 Views, 4 Replies

How to read file properties Inventor (ipt. idw. dwg) of a web application.

Hello. I am developing a web app ASP.NET MVC 3, which will read the properties files of Inventor (dwg, idw, ipt, iam). Read the properties of these files is by using objects Apprentice Server, which provides Autodesk Inventor View 2012. Connection objects is done through the library RxApprentice.tlb.

 

Code is shown below:

 public ActionResult Index ()
 {
       try
       {
           ApprenticeServerComponent appServerComponent = new ApprenticeServerComponent ();

           ApprenticeServerDocument apprenticeServerDocument = appServerComponent.Open (FileName);

           var ListPropety = apprenticeServerDocument.PropertySets ["Design Tracking Properties"].

                                                                                                             Cast <Property> (). ToList ();

           var CollectionProperty = ListPropety
                                . Where (x => x.Name! = "Thumbnail")
                                . ToDictionary <Property, string, object> (
                                    property => property.Name,
                                    property => property.Value
                                );
                ViewBag.CollectonProperty = CollectionProperty;
                }
                catch (System.Runtime.InteropServices.COMException ex)
                {
                    ViewBag.ComException = ex.Message;
                }
            return View ();
}

While debugging applications on Web-server - IIS Express 7.5 development environment Visual Studio 2010 application runs without errors.
After publishing a Web application on IIS 7.0 the following error: "Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL))ยป.

 

A tried: change User Account Control Settings, and set permissions to configuration DCOM objects in Component Services  - no results.

Is it possible to read the file properties Inventor of Web applications, and how to do it? Help solve the problem. Thanks for any help!

4 REPLIES 4
Message 2 of 5
xiaodong_liang
in reply to: prixodkomv

Hi,

 

I also did similar in the past, but as I remember Apprentice is not able to open a file of URL. Are your file on server or client? And which line caused the error?

Message 3 of 5
prixodkomv
in reply to: prixodkomv

Hi. The file on the client computer. The error in:

ApprenticeServerComponent appServerComponent = new ApprenticeServerComponent (); 

Message 4 of 5
xiaodong_liang
in reply to: prixodkomv

Have you make a copy of Autodesk.Inventor.Interop.dll on the server, all the server has also the dll available? But as said, even with this, Apprentice cannot open a file of URL.

Message 5 of 5
FRPT1257
in reply to: xiaodong_liang

Hi prixodkomv,

 

Did you get an solution for your problem?

 

I have a similar problem when tried to use the ApprenticeServerComponent from a Windows Service.

 

Thanks & Regards,

Rui

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

Post to forums  

Autodesk Design & Make Report