Parameter is not linking in LeaderNote text in c#.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello All ,
I hope you all are good . I am getting an issue i.e. parameter is not getting linked in leader note. I got vba code and I have converted it and used in c#. But parameter is not linking there. Please check the bellow code and let me know where I did wrong.
try{
ObjectCollection leaderPoints = invApp.TransientObjects.CreateObjectCollection();
Point2d notePoint1 = cm1.Position.Y < cm2.Position.Y ? cm1.Position : cm2.Position;
Point2d notePoint2 = cm1.Position;
notePoint2.X += notePoint1.X < baseView.Center.X ? -baseView.Width * 0.25 : baseView.Width * 0.25;
notePoint2.Y += drawingConstant.FontPlacementConstant * 5;
leaderPoints.Add(notePoint2);
leaderPoints.Add(notePoint1);
string Dia = FeatureParameterConstants.SlotDiameter ;
string holeDia = "<Parameter Resolved='True' ComponentIdentifier='" + drawingDoc.FullFileName + "' Name='" + Dia + "' Precision='0' ></Parameter>";
string Depth = FeatureParameterConstants.SlotDepth ;
string holeDepth = "<Parameter Resolved='True' ComponentIdentifier='" + drawingDoc.FullFileName + "' Name='" + redirectionDepth + "' Precision='0' ></Parameter>";
var holeNote = $"Slot{System.Environment.NewLine}{Dia} wide, {Depth} deep";
LeaderNote leaderNote = drawingDoc.ActiveSheet.DrawingNotes.LeaderNotes.Add(leaderPoints, "Temp");
leaderNote.FormattedText = holeNote;
}
catch (Exception Ex)
{
throw Ex;
}
Thanks in Advance ...!!