[CONNECT UPDATE 15 C#] LineStyle Scale

Hello,

I have problem with setting scale for linestyle in c#. If anyone found working solution please share it.

So far I tried to use ElementPropertiesSetter SetLineStyle function because this function takes LineStyleParameters as param but i can't create LineStyleParameters because it does not have constructor.

I tried to get LineStyleParameters from ElementPropertiesGetter and I get some but I can't change Scale for that object, it stays unchanged after lineStyle.Scale = scale.

Regards.

Parents Reply
  • It gives me the same result as LINQ, crash at setting scaleProperty.DoubleValue. I think at this moment I will let go this way. I found a way to scale line using transformation but it scale whole line, length too what is not what i want but then I recreate element using transformed one as a template.

    If any1 would need it, it looks like this:

     LineElement el = new LineElement(dgnModel, null, segment);
     DTransform3d transform = DTransform3d.FromUniformScaleAndFixedPoint(segment.FirstPoint, scale);
     TransformInfo info = new BNET.TransformInfo(transform);
     el.ApplyTransform(info);
     el = new LineElement(dgnModel, el, segment);

Children