SolidWorks 2012 API is not updating Drawing Sheet Custom Properties Values

Hello Team,

I am working on one of standalone desktop version of Solidwork Automation applicaiton in C#. There is one section in which after updating Solidworks master assembly (.SLDPARTS) values i show /load corresponding  .SLDDRW  file  through C# ,After Loading/shown .SLDDRW file on machine i create  rerference of CustomPropertyManager and assign it value retrun by this swmodeldoc.Extension.CustomPropertyManager[""];. after this i call Set method of CustomPropertyManager and update sheet properties . it return values of .Set("", "")  is 0 that show method called successfully however once i call swmodeldoc.ForceRebuild3(true); to get update values on Drawing sheet(8.SLDDRW)method however it does not update drawing sheet.

Same below  approcach has been working fine in VB.NET and not in C# .

Below is Code Smaple:-

swmodeldoc = (SldWorks.ModelDoc2)Swapp.OpenDoc6("*.SLDDRW", 3, 0, "", Longstatus, longwarnings);

                      swmodeldoc.ViewZoomtofit2();

                      Swapp.ActivateDoc2("*.SLDPRT", false, Longstatus);

                     CustomPropertyManager   cuspropmgr = null;

                     cuspropmgr =swmodeldoc.Extension.CustomPropertyManager[""];

                retval = cuspropmgr.Set("CustomProperty1", Convert.ToString(value1));

           retval = cuspropmgr.Set("CustomProperty2", Convert.ToString(value2));

Swapp.ActivateDoc2("Lifting Set.SLDDRW", false, Longstatus);

                bRet = swmodeldoc.ForceRebuild3(true);

Please suggest/fix the missing thing if any .appreciate for your response.

Regards

Alok

SolidworksApi macros