How to make a note with box in JLink??
Hi Everyone, I‘m a newcomer in JLink, so I have occurred a lot of problems during developing, but there is a little problem which I have not idea how to fix. This problem is about making customize note with box in drawing, but I cannot make note success in a box with leader. Just see my code following:
public static void setNoteDetail(Session session, Selection sel) throws jxthrowable {
Model currentModel = session.GetCurrentModel();
WoodSelection woodSel = new WoodSelection();
Window win = session.GetCurrentWindow();
win.Activate();
if(currentModel.GetType() != ModelType.MDL_DRAWING) {
return;
}
Drawing currentDrawing = (Drawing) currentModel;
// font definition
DetailText detailText = pfcDetail.DetailText_Create("@[123@]");
DetailTexts detailTexts = DetailTexts.create();
AnnotationTextStyle anotationTextStyle = pfcDetail.AnnotationTextStyle_Create();
anotationTextStyle.SetHeight(3.5);
detailText.SetTextStyle(anotationTextStyle);
detailTexts.set(0, detailText);
DetailTextLine detailTextLine = pfcDetail.DetailTextLine_Create(detailTexts);
DetailTextLines detailTextLines = DetailTextLines.create();
detailTextLines.set(0, detailTextLine);
View2D view = sel.GetSelView2D();
Point3D point = sel.GetPoint();
Transform3D transformMatrix = view.GetTransform();
point = transformMatrix.TransformPoint(point);
FreeAttachment freeAttachment = pfcDetail.FreeAttachment_Create(point);
freeAttachment.SetView(view);
DetailNoteItem detailNoteItem = currentDrawing.CreateFreeNote(detailTextLines, freeAttachment);
// arrow definition
ParametricAttachment leaderParaAttachment = pfcDetail.ParametricAttachment_Create(sel);
LeaderAttachment leaderAttachment = pfcDetail.LeaderAttachment_Create(leaderParaAttachment);
LeaderAttachments leaderAttachments = LeaderAttachments.create();
leaderAttachments.set(0, leaderAttachment);
detailNoteItem.SetLeaders(leaderAttachments);
detailNoteItem.Show();
detailNoteItem.IsDisplayed();
}
Well, I got result with this code just see the picture, the note without box,

I do not know why , how to input text in JLink can CreO display note with box??
