Hi Vinay,
Hi Imran,
Thank you for response.
I came across one more problem which is related to glue feature which aspose team has resolved earlier.
I tried to glue PCI Card into Shape using
page1.GlueShapesInContainer(pciCardId, “PCI1Begin”, “PCI1End”, fasControllerId);
Or
page1.GlueShapesInContainer(pciCardId, 16, 15, fasControllerId);
Also tried
page1.GlueShapesInContainer(pciCardId, “Connections.PCI1Begin”, “Connections.PCI1End”, fasControllerId);
but it says - Cannot find connection points.
None of the above is able to glue PCI card at proper location.
I am attaching an image for your reference, so you can get better idea of problem.
I have also highlighted what i am trying to achieve (Gluing 1 into 2).
Please correct me if i am wrong.
Your quick response is highly appreciated on this issue.
Thank you
vinay_jadon:
Please have a look on attached project and guide me accordingly to achieve labeling.
I am trying to set label on shape.
Please get stencil from this thread as i am not able to attached stencil due to size constraint.
Stencils attachment is available on 1st page, please refer "fas stencil".
Please revert with solution asap, we are running in tight schedule.
Thank You
foreach (Aspose.Diagram.Page page in diagram.Pages) { page.PageSheet.PageProps.PageHeight.Ufe.F = "11 ft 4 in"; page.PageSheet.PageProps.PageWidth.Ufe.F = "14 ft 8 in"; page.PageSheet.PageProps.PageScale.Ufe.F = "0.75 in"; page.PageSheet.PageProps.DrawingScale.Ufe.F = "1 ft"; }
string FasStencil = @"C:\temp\FAS-series.vss"; string fasMaster = "FAS2240-4 front"; diagram.AddMaster(FasStencil, fasMaster);
Master mstr = diagram.Masters.GetMasterByName(fasMaster); Shape s = new Shape(); s.Layout.ShapePermeablePlace.Value = BOOL.True; s.Layout.ShapePlaceStyle.Value = ShapePlaceStyleValue.PlaceHierarchyLeftToRightMiddle; s.Type = TypeValue.Shape; s.Master = mstr; s.Name = mstr.Name;
s.XForm.PinX.Value = 20; s.XForm.PinY.Value = 50;
s.Text.Value.Add(new Cp(0)); s.Text.Value.Add(new Txt("hello")); s.Chars.Add(new Aspose.Diagram.Char()); s.Chars[0].IX = 0; s.Chars[0].Color.Value = "10"; s.Chars[0].Font.Value = 4; s.Chars[0].Size.Value = 0.22; s.Chars[0].Style.Value = StyleValue.Undefined;
Page page1 = diagram.Pages[0]; long fasId = page1.AddShape(s, fasMaster);
string masterName = "12pt. text";
diagram.AddMaster(@"C:\temp\Annotations (Metric).vss", masterName);
double width = 30, height = 5, pinX = 5, pinY = 50;
//Add a new rectangle shape long textShapeId = diagram.AddShape( pinX, pinY, width, height, masterName, 0);
//Set the new shape's properties Shape shape = diagram.Pages[0].Shapes.GetShape(textShapeId);
shape.XForm.Angle.Value = 0; shape.Text.Value.Add(new Cp(0)); shape.Text.Value.Add(new Txt("Some Text")); shape.Chars.Add(new Aspose.Diagram.Char()); shape.Chars[0].IX = 0; shape.Chars[0].Color.Value = "10"; shape.Chars[0].Font.Value = 4; shape.Chars[0].Size.Value = 0.22; shape.Chars[0].Style.Value = StyleValue.Undefined; // we can also move text label shape on the page anywhere //shape.MoveTo(3.0, 3.0); diagram.Save(@"C:\temp\MyOutput.vdx", SaveFileFormat.VDX);
vinay_jadon:I came across one more problem which is related to glue feature which aspose team has resolved earlier.I tried to glue PCI Card into Shape usingpage1.GlueShapesInContainer(pciCardId, "PCI1Begin", "PCI1End", fasControllerId);Orpage1.GlueShapesInContainer(pciCardId, 16, 15, fasControllerId);
Hi Imran,
Thank you for update on labeling issue.
I will try suggested code to get labeling done at my side.
Please find attached project for PCI Card gluing issue.
Please have a look and provide fix for problem.
Thank You
Hi Imran,
Thank you for output file you shared for label issue.
I viewed that file in different versions of visio and found output is not properly visible in Visio 2013.
I am attaching screenshots of both versions.
Please have a look and suggest solution.
Thank You
Hi Vinay,
Hi Imran,
In my previous post I indicated regarding labelling that in visio 2013 text is getting mashed up and in visio 2010 its visible properly, so can you please give some input on that issue.
Thank You
Hi Vinay,
Hi Vinay,
Hi Vinay,
Shape shape = diagram.Pages[0].Shapes.GetShape(textShapeId);
shape.XForm.Angle.Value = 0;
shape.Text.Value.Add(new Cp(0));
shape.Text.Value.Add(new Txt(“Some Text”));
shape.Chars.Add(new Aspose.Diagram.Char());
//add this line to set fontscale
shape.Chars[0].FontScale.Value = 1;
shape.Chars[0].IX = 0;
shape.Chars[0].Color.Value = “10”;
shape.Chars[0].Font.Value = 4;
shape.Chars[0].Size.Value = 0.22;
shape.Chars[0].Style.Value = StyleValue.Undefined;
The issues you have found earlier (filed as DIAGRAMNET-50299) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.
Hi Vinay,
Hi Vinay,
Diagram diagram = new Diagram();
// insert a text label
diagram.Pages[0].AddText(1, 1, 1, 1, “Test text”);
// save Visio drawing
diagram.Save(“c:\temp\test.vdx”, SaveFileFormat.VDX);
The issues you have found earlier (filed as DIAGRAMNET-50221) have been fixed in Aspose.Diagram for .NET 16.11.0.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.
The issues you have found earlier (filed as ) have been fixed in this Aspose.Words for JasperReports 18.3 update.