Perspective Fixed Coordinate Container X Y

I am in the process of developing some views where I need to create some machine/conveyor layout mimic pages using Fixed Coordinate Containers, the rest of the project is mainly of flex containers.

Is there a setting or trick to force the x-y / width-height properties to always be whole numbers, without any decimal places?

I am having to continually adjust these to get the many objects to line up properly or look the way I want.

Development would be a lot faster if there was an adjustable snap setting. I know of the align tools but I have multiple items layered on top of each other and selecting the right components is time consuming and prone to error.

Not sure on the whole numbers and all, but a note on your comment about selecting the right components...if you name your components things that make sense and are meaningful, then boom you can easily select them from the project browser. You can even multi select and align them that way.

You can even name flex containers or other coord containers you place in it and do alignments there. If you can section things out in a way that makes sense, do it. It will make navigating changes and support so much easier. With this keep in mind types of containers and how they interact with coord fixed versus percent.

Always always always name your components. Flex Container 95 doesn't tell you anything.

Not to say you aren't but thats the simplest solution to the selecting the right components.

1 Like

This sounds a lot like you should be building up dynamic single SVG graphics instead of layering items. Then you won't have issues scaling.

1 Like

I have tried a single svg a few times, but the intense pain when needing to modify them just didn't seem worth it, eg setting up bindings again on the things you changed. Maybe groupings were changed and things added into them, that's when the ultimate pain came :face_with_crossed_out_eyes: unless you go a different method instead of bindings to using element ids or something and scripting the changes?

The bindings all shift pretty well now. I don't think that bug still exists where bindings didn't follow an array element if you removed the previous one. My workflow is normally set up where you make the SVG, set up the IDs and hierarchy and then import it into Perspective as embedded. You then immediately copy it out of the props and regex find and replace to remove fill and stroke elements. Copy it back overwriting the initial structure and now you apply a basic cover all style with a wildcard on it to theme everything to a base style. Add custom props for every external binding/data point you will use in the root svg. Bind all the elements you need to whatever you need internally but bind them only to the custom props. That way you abstract them better and can do many to one combinations to save lots of extra data entry.
If you need to do changes, I draw them in an svg editor with the original svg file and copy out the d entry for paths into a duplicated part of the SVG structure with updated IDs. That way you have both the changes and the updated Ignition view.

2 Likes

You dont use big svgs anymore even with my svg click injections?

1 Like

Nope, I couldn't imagine not using embedded views for device symbols! There is a lot of stuff a template affords

I agree. You're just creating technical debt and increasing a customer's support costs if you don't give components meaningful names.

1 Like

huh i could have sworn you have asked questions about svg scaling before. But maybe it was someone/something else :man_shrugging:

1 Like

If you need to create a lot of stuff on a specific position. The view canvas is also pretty nice to generate things on a specific location.

2 Likes