Save assembly

hey guys!

 

it's me again Smiley Happy I have a following problem:

My program opens an assembly file and updates it, basically it makes visible or invisible occurences and suboccurences, writes variable values in variable table and so on. After that I want to save file and close it.

when I use standart objDoc.Save() it doesnt save the occurences that I made visible or invisible before. I can only make it happen when click the "Save" Button in Solid Edge. I checked it in SES Spy Event to see the difference between Save() Method and actual Save button in SE.

Save() Method:

AfterCommandRun theCommandID (AssemblyCommandConstants.AssemblyAssemblyToolSelect)

BeforeDocumenSave theDocument (NameOfTheDocument.asm)

AfterDocumentSave theDocument (NameOfTheDocument.asm)

BeforeCommandRun theCommandID (AssemblyCommandConstants.AssemblyAssemblyToolSelect)

 

 

Save Button:

AfterCommandRun theCommandID (AssemblyCommandConstants.AssemblyAssemblyToolSelect)

BeforeCommandRun theCommandID (AssemblyCommandConstants.AssemblyFileSave)

BeforeDocumenSave theDocument (NameOfTheDocument.asm)

AfterDocumentSave theDocument (NameOfTheDocument.asm)

AfterCommandRun theCommandID (AssemblyCommandConstants.AssemblyFileSave)

BeforeCommandRun theCommandID (AssemblyCommandConstants.AssemblyAssemblyToolSelect)

 

Any Ideas how I can program that? I tried to do that over API functions but can not find the one for assemblyfilesave...

I am using Visual Studio 2010 and VB.NET

 

Any help is highly appreciated..

 

Regards, salwadora

 

Posted by: Salwadora
Post date: 2/26/2013 3:17:41 AM

3 REPLIES

Save assembly

No one knows what I can do about it?

 

Posted by: Salwadora
Post date: 2/27/2013 5:44:38 AM

Save assembly

No one knows what I can do about it?

 

Posted by: Salwadora
Post date: 2/27/2013 5:44:46 AM

Save assembly

Hey guys, I found the solution and just wanted to share it here if someone else has the same problem at some point.

Well, I ran my programm in the background setting seApplication.Visible to False. As soon as I changed it to True before saving the document, it worked properly.

 

Regards, salwadora

 

Posted by: Salwadora
Post date: 2/28/2013 10:40:45 AM