Showing results for 
Search instead for 
Did you mean: 

How to automate WebPublisher ?

Valued Contributor
Valued Contributor


I am experimenting the use of WebPublisher via COM API.

First of all, unfortunately, API are not exposed on the Application.Addins(x).Object so no way to use programmatically the running instance of webpublisher addin.

You can anyway automate the production of web folder using directly the publish.dll provided library, assuming it is COM registered correctly.

Set WP = New publishLib.SEWebPublisher

WP.PublishFilename = sPublishFileName

WP.PublishTemplate = sMyTemplateDir

WP.PublishDirectory = sPublishDir

WP.PublishTitle = sPublishTitle

WP.PublishPageStyle = styleViewerOnly ' styleViewerRight

WP.PublishAuthor = ""

WP.PublishDate = ""

WP.PublishAttribute("Company") = "?"


WP.Generate (1)

The problem now is: does anyone knows a way to specify some generation options like "SAVE PAGE ON SINGLE EXECUTABLE" ?

I guess they are some special tags on WP.PublishAttribute("xxx") but i could not find any useful hints on typelib.

Suggestions anyone ?


Posted by: Paolo Marani
Post date: 9/24/2009 12:29:46 AM


RE: How to automate WebPublisher ?

Valued Contributor
Valued Contributor

Hi Paolo,


the Web Publisher API is documented in the help file "publish.chm" under the directory "program" of your Solid Edge installation.


But don't expect to much. The product Web Publisher hasn't changed since 9 years about. It is quite old fashioned, frame based and not flexible at all. So you can't define anywhere i.e. which properties to publish etc. Each published model requires its own copy of template files consisting of HTML and JavaScript. Even if you customize all files of a template to be i.e. compatible with XHTML and UTF-8 formatting you have to patch and convert some generated HTML files after having published a new model. Requiring ActiveX to be enabled and solely supporting IE is a security issue for many customers too. I made once a customization to allow a published model to be selected from all published models and to manage a parts shopping cart for a whole tree of published models. The solution also should support English, German and Russian language. It was a nightmare to realize ...


Posted by: Wolfgang Kunert
Post date: 9/24/2009 1:36:45 AM

RE: How to automate WebPublisher ?

Valued Contributor
Valued Contributor

Thank you for your replay, documentation do really exist inside \program\ResDlls\0009\Publish.chm but it is not much more than an autogenerated dump of the type library content, and the example is just te one i wrote above.


About my question, it is possible to specify all other wizard options like "save executable" and include IPA-viewer ?


I agree that it's quite old fashoned and literaly abandoned code, but for some simple use it's still adequate. awaiting it to be revamped on forthcoming solid edge releases.


Paolo Marani

Engineering SPA


Posted by: Paolo Marani
Post date: 9/24/2009 3:53:53 AM