[BUG-11342] Perspective - Can't draw any shapes

I don’t know what you mean by needing to restart the designer? SVGs imported (embedded option) appear on the page immediately without any need to restart anything. I presume the same if you add an SVG to the image library, but then you lose all functionality associated with an SVG so it defeats the purpose.

While not ideal, I use labels with borders for pipework, in absence of proper pipe/line drawing tools. These however work really well. The only issue is that if you use one label for joined pipes (e.g. two perpendicular pipes), the click box is the entire bounding box, so it makes selecting components beneath them difficult; if the perpendicular sections are long, you might spend more time accidentally dragging around your pipe than doing anything else…

1 Like

As someone who spends a significant amount of my working day developing HMI/SCADA screens, I would agree that it would be a huge headache to lay out an entire screen or even a complex section of a screen in an vector graphics program and embed it into a Perspective view only to have the customer’s factory layout change a month later and have them ask you to redo your screen. :slight_smile:

When I use SVGs, I try to break them up into the smallest, most reusable sections (usually at the device level) to help retain layout flexibility for the future. I tend to create a template view for each device type that contains my graphics (whether SVGs or simply just labels with some creative application of style classes), embed them into a coordinate view where needed, then join them using labels or containers as your “piping” or “wiring.” I usually set up a style class with a set background color for all of my piping, then it’s just a matter of adjusting the coordinates and sizing to get the necessary layout. If devices move in the future, it’s just a simple matter of dragging them around on screen and then adjusting your piping/wiring to match after the fact.

Of course, it is entirely possible to quickly create device graphics natively in Perspective without SVGs as well. Everything in the screenshot below are either labels or containers with some styling applied to them:
image

Your mileage may vary, just saying that a lack of traditional drawing tools is not the end of the world.

@swolnisty
Just an FYI if you weren’t aware, stroke weight scales by default. If you want to maintain the weight you set, you can use the style:

vector-effect: non-scaling-stroke

(Just comparing your tank stroke compared with your pumps’ stroke)

3 Likes

I have noticed this but had not bothered to track down the CSS property to fix it yet. I appreciate the heads-up!

1 Like

Yeah, you are right, I was looking at the Icons for which I have to restart the Designer, silly me. The images can be imported as you suggested without restarting. I think I just had messed up the SVG files I was trying to create from scratch and they weren’t working right. Third party app for SVG drawing does produce files that work correctly. Thanks for the feedback and advice.

Not sure if worth mentioning, that if you do use Inkscape, you should save your SVGs as an Optimised SVG and not as an Inkscape SVG. It pulls all the crap out of the file.

I use these settings fwiw:
Edit: uncheck the top option, don’t remove unused ids
image
image
image

9 Likes

Finally,


This is not like in vision but it’s a good start

Not sure what you mean, Vision doesnt have a piping tool at all?

yes but piping could be use to simplify line drawing (for the echo that i have. I did not test it).
After that i hope they will move forward to draw like in vision.

Hi,

Just wondering where I set ''vector-effect: non-scaling-stroke"?

Regards,

Josh

I’m assuming that you’re using it for an SVG that you’ve imported. In that case, you need to add it to the style property in the element that you want it to apply to. I can’t remember if it applies to child elements or only to its own element, so you may need to apply it in the base element or each base element

1 Like

thank you!

How do you get the piping visualization?

https://docs.inductiveautomation.com/display/DOC81/Perspective+Pipes

Ensure you are version 8.1.10 or above and the Piping Visualization Tool will be in the Perspective Tool Bar (see the User Manual for screenshot).

We are using 8.1.0
Upgrading to 8.1.10, does that effect anything that we currently have done?

Possibly. As with all upgrades you will need to test your project afterwards. One thing springs to mind and that’s a change to tag qualities. They now contain more descriptive text at the end, so if you are comparing quality strings to values e.g. “Bad_Disabled” then these expressions will be invalid now and need to be updated

10 4

No, 8.1.15 :laughing:

1 Like

lol

Glad to use piping function.

Does it take too much resources if I place a hundred piping element in one view?