Perspective SVG Question

Hello All,

I have an SVG which has been saved as optimized in InkScape. When I drag this SVG onto a view and upload and link Perspective does not show the viewBox Parameter, however when I open the SVG in notepad the parameter is there. Am I missing something here?

Thanks,

Frank

does it work if you manualy put in the viewbox param?

No, I can add a property viewBox and it does not affect the SVG.

can you show the code of the svg?

<svg width="19.948mm" height="74.188mm" version="1.1" viewBox="0 0 19.948 74.188" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
 <title>1756-ENBT - Ethernet IP</title>
 <defs>
  <linearGradient id="linearGradient5413">
   <stop stop-color="#808080" offset="0"/>
   <stop stop-color="#ccc" offset="1"/>
  </linearGradient>
  <linearGradient id="linearGradient4509" x1="96.384" x2="115.62" y1="130.53" y2="130.53" gradientTransform="matrix(1.0177,0,0,1.0092,-2.0444,-1.4674)" gradientUnits="userSpaceOnUse">
   <stop stop-color="#b3b3b3" offset="0"/>
   <stop stop-color="#e6e6e6" offset="1"/>
  </linearGradient>
  <linearGradient id="linearGradient4519" x1="95.859" x2="115.81" y1="122" y2="122" gradientUnits="userSpaceOnUse" spreadMethod="reflect">
   <stop offset="0"/>
   <stop stop-color="#333" offset="1"/>
  </linearGradient>
  <linearGradient id="linearGradient5233" x1="105.7" x2="114.7" y1="106.41" y2="106.41" gradientTransform="matrix(1.0888 0 0 .69558 -9.2666 32.259)" gradientUnits="userSpaceOnUse" spreadMethod="reflect">
   <stop stop-color="#808080" offset="0"/>
   <stop stop-color="#ccc" offset="1"/>
  </linearGradient>
  <linearGradient id="linearGradient5233-4" x1="105.7" x2="114.7" y1="106.41" y2="106.41" gradientTransform="matrix(1.0888 0 0 .69558 -9.2666 36.68)" gradientUnits="userSpaceOnUse" spreadMethod="reflect">
   <stop stop-color="#808080" offset="0"/>
   <stop stop-color="#ccc" offset="1"/>
  </linearGradient>
  <linearGradient id="linearGradient5233-4-9" x1="105.7" x2="114.7" y1="106.41" y2="106.41" gradientTransform="matrix(1.0888 0 0 .69558 -9.2666 41.102)" gradientUnits="userSpaceOnUse" spreadMethod="reflect">
   <stop stop-color="#808080" offset="0"/>
   <stop stop-color="#ccc" offset="1"/>
  </linearGradient>
  <linearGradient id="linearGradient5233-4-5" x1="105.7" x2="114.7" y1="106.41" y2="106.41" gradientTransform="matrix(1.0888 0 0 .69558 -9.2666 45.523)" gradientUnits="userSpaceOnUse" spreadMethod="reflect" xlink:href="#linearGradient5413"/>
  <linearGradient id="linearGradient5233-4-0" x1="105.7" x2="114.7" y1="106.41" y2="106.41" gradientTransform="matrix(1.0888 0 0 .69558 -9.2666 49.945)" gradientUnits="userSpaceOnUse" spreadMethod="reflect">
   <stop stop-color="#808080" offset="0"/>
   <stop stop-color="#ccc" offset="1"/>
  </linearGradient>
  <linearGradient id="linearGradient5233-4-7" x1="105.7" x2="114.7" y1="106.41" y2="106.41" gradientTransform="matrix(1.0888 0 0 .69558 -9.2666 54.366)" gradientUnits="userSpaceOnUse" spreadMethod="reflect">
   <stop stop-color="#808080" offset="0"/>
   <stop stop-color="#ccc" offset="1"/>
  </linearGradient>
  <linearGradient id="linearGradient5233-4-1" x1="105.7" x2="114.7" y1="106.41" y2="106.41" gradientTransform="matrix(1.0888 0 0 .69558 -9.2666 58.787)" gradientUnits="userSpaceOnUse" spreadMethod="reflect">
   <stop stop-color="#808080" offset="0"/>
   <stop stop-color="#ccc" offset="1"/>
  </linearGradient>
  <linearGradient id="linearGradient5233-4-2" x1="105.7" x2="114.7" y1="106.41" y2="106.41" gradientTransform="matrix(1.0888 0 0 .69558 -9.2666 63.209)" gradientUnits="userSpaceOnUse" spreadMethod="reflect">
   <stop stop-color="#808080" offset="0"/>
   <stop stop-color="#ccc" offset="1"/>
  </linearGradient>
  <linearGradient id="linearGradient5233-4-2-1" x1="105.7" x2="114.7" y1="106.41" y2="106.41" gradientTransform="matrix(1.0888 0 0 .69558 -9.2624 80.894)" gradientUnits="userSpaceOnUse" spreadMethod="reflect" xlink:href="#linearGradient5413"/>
  <linearGradient id="linearGradient5233-4-1-1" x1="105.7" x2="114.7" y1="106.41" y2="106.41" gradientTransform="matrix(1.0888 0 0 .69558 -9.2624 76.473)" gradientUnits="userSpaceOnUse" spreadMethod="reflect" xlink:href="#linearGradient5413"/>
  <linearGradient id="linearGradient5233-4-7-4" x1="105.7" x2="114.7" y1="106.41" y2="106.41" gradientTransform="matrix(1.0888 0 0 .69558 -9.2624 72.051)" gradientUnits="userSpaceOnUse" spreadMethod="reflect" xlink:href="#linearGradient5413"/>
  <linearGradient id="linearGradient5318-9" x1="110.01" x2="114.14" y1="92.512" y2="95.018" gradientTransform="translate(-3.3652,4.7192)" gradientUnits="userSpaceOnUse" xlink:href="#linearGradient5314"/>
  <linearGradient id="linearGradient5314">
   <stop stop-color="#808080" offset="0"/>
   <stop stop-color="#808080" stop-opacity="0" offset="1"/>
  </linearGradient>
  <linearGradient id="linearGradient5318-8" x1="110.01" x2="114.14" y1="92.512" y2="95.018" gradientTransform="translate(-8.0622,4.7192)" gradientUnits="userSpaceOnUse" xlink:href="#linearGradient5314"/>
  <linearGradient id="linearGradient5318" x1="110.01" x2="114.14" y1="92.512" y2="95.018" gradientTransform="translate(-12.753,4.7192)" gradientUnits="userSpaceOnUse" xlink:href="#linearGradient5314"/>
 </defs>
 <g transform="translate(-95.859 -84.903)">
  <rect x="96.044" y="85.088" width="19.579" height="73.819" stroke="url(#linearGradient4519)" stroke-linejoin="round" stroke-width=".36936"/>
  <rect x="96.044" y="101.63" width="19.579" height="57.277" fill="url(#linearGradient4509)"/>
  <g stroke="#fff" stroke-linejoin="round">
   <g stroke-width=".021756">
    <rect x="96.044" y="106.1" width="19.579" height=".35014" fill="url(#linearGradient5233)"/>
    <rect x="96.044" y="110.52" width="19.579" height=".35014" fill="url(#linearGradient5233-4)"/>
    <rect x="96.044" y="114.94" width="19.579" height=".35014" fill="url(#linearGradient5233-4-9)"/>
    <rect x="96.044" y="119.36" width="19.579" height=".35014" fill="url(#linearGradient5233-4-5)"/>
    <rect x="96.044" y="123.78" width="19.579" height=".35014" fill="url(#linearGradient5233-4-0)"/>
    <rect x="96.044" y="128.21" width="19.579" height=".35014" fill="url(#linearGradient5233-4-7)"/>
    <rect x="96.044" y="132.63" width="19.579" height=".35014" fill="url(#linearGradient5233-4-1)"/>
    <rect x="96.044" y="137.05" width="19.579" height=".35014" fill="url(#linearGradient5233-4-2)"/>
    <rect x="96.048" y="145.89" width="19.579" height=".35014" fill="url(#linearGradient5233-4-7-4)"/>
    <rect x="96.048" y="150.31" width="19.579" height=".35014" fill="url(#linearGradient5233-4-1-1)"/>
    <rect x="96.048" y="154.73" width="19.579" height=".35014" fill="url(#linearGradient5233-4-2-1)"/>
   </g>
   <rect x="96.048" y="141.19" width="19.571" height=".90135" fill="#999" stroke-width=".034732"/>
  </g>
  <path d="m96.044 85.088h19.579v3.2596h-19.579z" fill="#8d5fd3"/>
  <g aria-label="EtherNet/IP">
   <path d="m100.96 87.248h-0.84491v-1.2824h0.84491v0.15158h-0.67438v0.3514h0.67438v0.15158h-0.67438v0.47628h0.67438z" fill="#fff"/>
   <path d="m101.72 87.239q-0.0456 0.01206-0.0999 0.01981-0.0534 0.0078-0.0956 0.0078-0.14727 0-0.22393-0.07924-0.0767-0.07924-0.0767-0.25408v-0.5116h-0.10938v-0.13608h0.10938v-0.27647h0.16192v0.27647h0.33417v0.13608h-0.33417v0.43839q0 0.07579 3e-3 0.11886 3e-3 0.0422 0.0241 0.07924 0.019 0.03445 0.0517 0.05082 0.0336 0.0155 0.10163 0.0155 0.0396 0 0.0827-0.0112 0.0431-0.01206 0.062-0.01981h9e-3z" fill="#fff"/>
   <path d="m102.72 87.248h-0.16192v-0.54777q0-0.06632-8e-3 -0.12402-8e-3 -0.05857-0.0284-0.0913-0.0215-0.03617-0.062-0.0534-0.0405-0.01809-0.10508-0.01809-0.0663 0-0.13866 0.03273-0.0724 0.03273-0.13867 0.08354v0.7183h-0.16192v-1.3401h0.16192v0.4849q0.0758-0.06287 0.15675-0.09819 0.081-0.03531 0.16623-0.03531 0.15589 0 0.23771 0.09388 0.0818 0.09388 0.0818 0.27044z" fill="#fff"/>id="path4579" /&gt;
   <path d="m103.84 86.784h-0.70883q0 0.08871 0.0267 0.15503 0.0267 0.06546 0.0732 0.10766 0.0448 0.04134 0.10593 0.06201 0.062 0.02067 0.13608 0.02067 0.0982 0 0.19723-0.03876 0.0999-0.03962 0.14211-0.07752h9e-3v0.17656q-0.0818 0.03445-0.16709 0.0577-0.0853 0.02326-0.17914 0.02326-0.23944 0-0.3738-0.12919-0.13436-0.13005-0.13436-0.36862 0-0.23599 0.12833-0.37466 0.12919-0.13866 0.33935-0.13866 0.19464 0 0.29972 0.11369 0.10594 0.11369 0.10594 0.32298zm-0.15762-0.12402q-8.6e-4 -0.12747-0.0646-0.19723-0.0629-0.06976-0.19207-0.06976-0.13005 0-0.20756 0.07665-0.0767 0.07665-0.087 0.19034z" fill="#fff"/>id="path4581" /&gt;
   <path d="m104.68 86.463h-9e-3q-0.0362-0.0086-0.0706-0.01206-0.0336-0.0043-0.0801-0.0043-0.0749 0-0.14469 0.03359-0.0698 0.03273-0.13436 0.08527v0.68299h-0.16192v-0.96204h0.16192v0.14211q0.0965-0.07752 0.16967-0.10938 0.0741-0.03273 0.15072-0.03273 0.0422 0 0.0612 0.0026 0.0189 0.0017 0.0568 0.0078z" fill="#fff"/>id="path4583" /&gt;
   <path d="m106.01 87.248h-0.31868l-0.54432-0.88022v0.88022h-0.30317v-1.2824h0.39533l0.46767 0.73467v-0.73467h0.30317z" fill="#fff"/>id="path4585" /&gt;
   <path d="m107.27 86.822h-0.70969q7e-3 0.11369 0.0861 0.17398 0.0801 0.06029 0.23513 0.06029 0.0982 0 0.19034-0.03531 0.0922-0.03531 0.14556-0.07579h0.0344v0.24891q-0.10508 0.0422-0.19809 0.06115-0.093 0.01895-0.20585 0.01895-0.29111 0-0.44614-0.13091t-0.15503-0.37293q0-0.23943 0.14642-0.37896 0.14728-0.14039 0.40308-0.14039 0.23598 0 0.35484 0.11972 0.11886 0.11886 0.11886 0.34279zm-0.30834-0.18173q-3e-3 -0.09732-0.0482-0.14642-0.0457-0.04909-0.14211-0.04909-0.0896 0-0.14728 0.04651-0.0577 0.04651-0.0646 0.149z" fill="#fff"/>id="path4587" /&gt;
   <path d="m108.11 87.239q-0.05 0.01292-0.10593 0.01981-0.056 0.0078-0.13695 0.0078-0.18086 0-0.26957-0.07321-0.0879-0.07321-0.0879-0.25063v-0.45217h-0.12747v-0.21015h0.12747v-0.27647h0.31005v0.27647h0.29025v0.21015h-0.29025v0.34279q0 0.05082 8.7e-4 0.08871 8.6e-4 0.0379 0.0138 0.06804 0.0121 0.03014 0.0422 0.04823 0.031 0.01723 0.0896 0.01723 0.0241 0 0.0629-0.01034 0.0396-0.01033 0.0551-0.01895h0.0258z" fill="#fff"/>id="path4589" /&gt;
   <path d="m109.2 85.908-0.68299 1.6192h-0.26441l0.6804-1.6192z" fill="#fff"/>id="path4591" /&gt;
   <path d="m110.22 87.248h-0.75103v-0.22738h0.21015v-0.82768h-0.21015v-0.22738h0.75103v0.22738h-0.21015v0.82768h0.21015z" fill="#fff"/>id="path4593" /&gt;
   <path d="m111.55 86.37q0 0.08613-0.0301 0.16881-0.0301 0.08182-0.0861 0.1378-0.0767 0.07579-0.17139 0.11455-0.0939 0.03876-0.23427 0.03876h-0.20584v0.41772h-0.33073v-1.2824h0.54432q0.1223 0 0.20585 0.02153 0.0844 0.02067 0.149 0.06287 0.0775 0.05082 0.11799 0.13005 0.0413 0.07924 0.0413 0.19034zm-0.34192 0.0078q0-0.05426-0.0293-0.09302-0.0293-0.03962-0.068-0.05512-0.0517-0.02067-0.10077-0.02239-0.0491-0.0026-0.13091-0.0026h-0.0568v0.38413h0.0947q0.0844 0 0.13866-0.01033 0.0551-0.01033 0.0922-0.04134 0.0319-0.02756 0.0456-0.06546 0.0146-0.03876 0.0146-0.09388z" fill="#fff"/>id="path4595" /&gt;
  </g>
  <text x="96.928909" y="100.43511" fill="#ffffff" font-family="sans-serif" font-size="1.3799px" letter-spacing="0px" stroke-width=".094084px" word-spacing="0px" style="line-height:125%" xml:space="preserve"><tspan x="96.928909" y="100.43511" fill="#ffffff" stroke-width=".094084px">LINK</tspan></text>
  <rect x="97.255" y="97.231" width="2.8063" height="1.4967" opacity=".98" stroke="url(#linearGradient5318)"/>
  <text x="101.90391" y="100.43511" fill="#ffffff" font-family="sans-serif" font-size="1.3799px" letter-spacing="0px" stroke-width=".094084px" word-spacing="0px" style="line-height:125%" xml:space="preserve"><tspan x="101.90391" y="100.43511" fill="#ffffff" stroke-width=".094084px">NET</tspan></text>
  <rect x="101.95" y="97.231" width="2.8063" height="1.4967" opacity=".98" stroke="url(#linearGradient5318-8)"/>
  <text x="106.99372" y="100.43511" fill="#ffffff" font-family="sans-serif" font-size="1.3799px" letter-spacing="0px" stroke-width=".094084px" word-spacing="0px" style="line-height:125%" xml:space="preserve"><tspan x="106.99372" y="100.43511" fill="#ffffff" stroke-width=".094084px">OK</tspan></text>
  <rect x="106.64" y="97.231" width="2.8063" height="1.4967" opacity=".98" stroke="url(#linearGradient5318-9)"/>
 </g>
</svg>

hmm i dont see anything wrong with that,
how did you add it into perspective?

I drag the file onto a view, then a get a window prompt asking me to upload and link or embed. I choose upload and link.

Thanks,

Frank

heh no idea that even worked like that. Do any other props work?

So you need to do embed. Then the SVG should come in as objects that can be manipulated.

2 Likes

When I choose embed the SVG does not render properly. All the gradients and text are black. So I’m conflicted on how to make this work.

Then you might need to simplify your SVG to bring it in.

How are you saving it in Inkscape?

I am saving as an enhanced SVG.

OK that’s probably you issue. Try saving it as an optimized SVG. Any way you can send me the actual svg file? I can take a look on my end as well.

I mis-spoke earlier, I am saving it as optimized. I will try to attach the SVG here for you to take a look at. Thanks!!

1756-ENBT_Rev5

I was able to import this SVG straight into perspective. It is a bit wonky, but it got in there. IE the text isn’t scaled right etc… You may need to tweak it a bit more in Inkscape to get it looking better.

This is part of the frustration I have with Perspective. So much effort on something as simple as putting a picture in a view. It would be nice to have the ability to create SVGs with a IA tool then there would be no “tweaking” in third party software programs. I feel the lack of drawing and image tools in Perspective is a big inconvenience.

In theory you can ‘code’ an svg when you drag in a drawing from the symbol factory.
image


if thats any more practical i doubt it xd
idk how similar it gets when you drag in your own svg file, iv not really used it

I don’t disagree at all. Unfortunately it’s what we have right now. I do keep hoping that one of the updates will include drawing tools among a few other things.

Did you ever figure out how to get the text to display properly?