Przesunięty tekst


Recommended Posts

Sprawdziłem zgłoszony przez Pana przypadek, ale u mnie działa OK.

Korzystam z wersji vernum  "2018.07.26(35476)_x64" być może to jest przyczyna.

Być może coś robimy inaczej.  W związku z tym chciałbym poprosić o szerszy przykład kodu, który wykorzystuje Pan do tworzenia tekstu. Być może na tej podstawie uda się ustalić coś więcej.

Link to comment
Share on other sites

 using (zzd.DBText acText = new zzd.DBText())
                                    {

                                        acText.TextString = "Liczba";
                                        acText.HorizontalMode = zzd.TextHorizontalMode.TextMid;
                                        acText.VerticalMode = zzd.TextVerticalMode.TextTop;
                                        acText.AlignmentPoint = new zzg.Point3d(ptStart.X + 56, ptStart.Y - 14, ptStart.Z);
                                        acText.TextStyleId = dimstyleIDE;
                                        acText.Height = 2;
                                        acText.Layer = nazwawarstwy;
                                        acText.ColorIndex = 2;
                                        acText.WidthFactor = 0.7;
                                        acText.Rotation = kierunek.Angle;
                                        acText.TransformBy(mat);                                        

                                        btr.AppendEntity(acText);
                                        tr.AddNewlyCreatedDBObject(acText, true);
                                        anonyGroup.Append(acText.ObjectId);
                                    }
using (zzd.DBText acText = new zzd.DBText())
                                    {

                                        acText.TextString = "Długość";
                                        acText.HorizontalMode = zzd.TextHorizontalMode.TextMid;
                                        acText.VerticalMode = zzd.TextVerticalMode.TextTop;
                                        acText.AlignmentPoint = new zzg.Point3d(ptStart.X + 65, ptStart.Y - 14, ptStart.Z);
                                        acText.TextStyleId = dimstyleIDE;

                                        acText.Height = 2;
                                        acText.Layer = nazwawarstwy;
                                        acText.ColorIndex = 2;
                                        acText.WidthFactor = 0.7;
                                        acText.Rotation = kierunek.Angle;
                                        acText.TransformBy(mat);
                                        
                                        btr.AppendEntity(acText);
                                        tr.AddNewlyCreatedDBObject(acText, true);
                                        anonyGroup.Append(acText.ObjectId);
                                    }

 

Link to comment
Share on other sites

Czcionka jakiej używam ma zapewne wpływ na wyświetlanie.

 zzd.TextStyleTable tst = (zzd.TextStyleTable)tr.GetObject(db.TextStyleTableId, zzd.OpenMode.ForWrite);
                                    string name = "PI_DIMENSIONTEXT";
                                    zzd.ObjectId dimstyleIDE;


                                    if (!tst.Has(name))
                                    {
                                        tst.UpgradeOpen();
                                        zzd.TextStyleTableRecord newRecord = new zzd.TextStyleTableRecord();
                                        newRecord.Name = name;
                                        newRecord.FileName = "simplex.shx";
                                        newRecord.XScale = 0.65; // Width factor
                                        tst.Add(newRecord);
                                        tr.AddNewlyCreatedDBObject(newRecord, true);
                                        dimstyleIDE = tst[name];
                                    }
                                    else
                                    {
                                        dimstyleIDE = tst[name];
                                    }

 

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...