2020 SP1 Program przestał działać


Parikon

Recommended Posts

Po aktualizacji do 2020 Sp1 jeden z moich programów przestał działać. Wyskakuje błąd eRegisteredAplicationidnotfound. Prawdopodobnie w tej wersji przestaje wykonywać się następujący kod.

// Open the Registered Application table for read
                    RegAppTable acRegAppTbl;
                    acRegAppTbl = tr.GetObject(db.RegAppTableId, OpenMode.ForRead) as RegAppTable;

                    // Check to see if the app "ACAD_DSTYLE_DIMJAG_POSITION" is
                    // registered and if not add it to the RegApp table
                    if (acRegAppTbl.Has("ZWCAD_DSTYLE_DIMJAG_POSITION") == false)
                    {
                        using (RegAppTableRecord acRegAppTblRec = new RegAppTableRecord())
                        {
                            acRegAppTblRec.Name = "ZWCAD_DSTYLE_DIMJAG_POSITION";
                            acRegAppTbl.UpgradeOpen();
                            acRegAppTbl.Add(acRegAppTblRec);
                            tr.AddNewlyCreatedDBObject(acRegAppTblRec, true);
                        }
                    }

 

Dalsza część kodu

// Create a result buffer to define the Xdata
                    ResultBuffer acResBuf = new ResultBuffer();
                    acResBuf.Add(new TypedValue((int)DxfCode.ExtendedDataRegAppName,
                                                             "ZWCAD_DSTYLE_DIMJAG_POSITION"));
                    acResBuf.Add(new TypedValue((int)DxfCode.ExtendedDataInteger16, 387));
                    acResBuf.Add(new TypedValue((int)DxfCode.ExtendedDataInteger16, 3));
                    acResBuf.Add(new TypedValue((int)DxfCode.ExtendedDataInteger16, 389));
                    acResBuf.Add(new TypedValue((int)DxfCode.ExtendedDataXCoordinate,
                                                             new zzg.Point3d(-1.26985, 3.91514, 0)));

                    zzd.ResultBuffer rb = new zzd.ResultBuffer(new zzd.TypedValue[10]

                           {new zzd.TypedValue((int)zzd.DxfCode.ExtendedDataRegAppName, "ZWCAD"),
                                new zzd.TypedValue((int)zzd.DxfCode.ExtendedDataAsciiString, "DSTYLE"),
                                new zzd.TypedValue((int)zzd.DxfCode.ExtendedDataControlString, "{"),
                                new TypedValue((int)DxfCode.ExtendedDataInteger16, 279 ), //DIMTMOVE
                                new TypedValue((int)DxfCode.ExtendedDataInteger16, 40 ), // DIMSCALE
                                new TypedValue((int)DxfCode.ExtendedDataInteger16, 271  ), // DIMDEC
                                new TypedValue((int)DxfCode.ExtendedDataInteger16, 41), // DIMASZ             
                                new TypedValue((int)DxfCode.ExtendedDataReal, 342 ),   // DIMBLK  
                                new TypedValue((int)DxfCode.ExtendedDataReal, 144 ),   // DIMLFAC
                                new TypedValue((int)DxfCode.ExtendedDataControlString, "}" )});

 

Edited by Parikon
Link to comment
Share on other sites

Już wiem kiedy przestaje działać. Gdy chcę wywołać wcześniej zdefiniowany
zzd.ResultBuffer rb

tym kodem

// Set the XData on our object
                           //poniższej linijki już nie wykonuje tylko wypisuje komunikat błędu "eRegisteredAplicationidnotfound"
                            wymiar.XData = rb;
                           
                            wymiar.XData = acResBuf;
                           
                            wymiar.XDataTransformBy(mat);
                           
                            wymiar.Dispose();
                           
                            wymiar_start = koniec;
                         

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...