GetPackAndGo parametering

Hello!

I have a problem with API use of Pack and Go.

The reference described how to use IModelDocExtension's GetPackAndGo method:

http://help.solidworks.com/2011/English/api/sldworksapi/solidworks.interop.sldworks~solidworks.interop.sldworks.imodeldocextension~getpackandgo.html

At the below linked a VBA example. I was follow that step by step in other language.

Shortly:

  • Start Solidworks (with Sldworks.Application)
  • Make it visible (with sets Visible to true)
  • Open assembly document (with OpenDoc6)
  • Gets document extension object (with get Extension property)
  • Finally, I tried to get Pack and Go object (with call GetPackAndGo function). This fails.

An exception has thrown:

8002000f / Parameter not optional. - This is a COM error code which means the call wants at least one parameter.

I don't understand this. The reference says GetPackAndGo would not parametered (at the above).

I tried on two exist computer and a virtual computer also (there was 64bit and 32bit also). Same problem.

I tried Java+JaCOB and Delphi 2007 also. Same problem.

I tried several assemblies to open. Same problem.

Otherwise, I tried to pass a parameter like swDocExt.GetPackAndGo( variant_typed_parameter ). In this case the error message was

80020005 / Type Mismatch.

It looks like the count of parameters now passed but the type is wrong. I tried many Variant types which are created from int, string, dispatch, null, passed by value, passed by refrence etc...

Can anybody help me?

BR,

Krisztian

SolidworksApi macros