cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Special Characters in Image link

vi1
15-Moonstone
15-Moonstone

Special Characters in Image link

Hi, 

 

If image name contains the special characters(#) and assign the image path to Thing property, image is not assigning to Thing property. If we go to thing and set the same image manually to Thing, image is assigning to Thing property. 

I have defined Property Type is IMAGELINK

 

I am using the below code for assign image to Thing property.

 

var imageName  = "Image #22.PNG"

var imagelinkpath = "/Thingworx/MediaEntities/" + imageName;

Things["XYZ"].Imagepath = imagelinkpath;

 

Could you suggest what way we can achieve if image name is having the special characters and assign the image to Thing in programmatically?

 

Thank You

 

Regards,

latha

1 ACCEPTED SOLUTION

Accepted Solutions
posipova
20-Turquoise
(To:vi1)

1 REPLY 1
posipova
20-Turquoise
(To:vi1)

Please look into this, try replacing your special character with the ascii code https://cachefly.zendesk.com/hc/en-us/articles/215068626-How-to-format-URLs-that-have-special-characters-in-the-filename-

Top Tags