Highlighted

Locking elements in generated SVG XML

Explorer ,
Sep 16, 2020

Copy link to clipboard

Copied

I wrote a Lucee/CF application that generates SVG XML. The SVG my application generates imports beautifully into Illustrator 24.3. When I lock some objects in my imported SVG document in Illustrator, and then save the document back out as SVG, I can open the new SVG document, and Illustrator correctly recalls all of my locked objects. But I see nothing in the SVG XML that was saved by Illustrator that would indicate which objects are locked. Is the locked state of objects in documents that are saved as SVG stored in some other form or location in the document other than the SVG XML which I can read when opening the saved SVG document in a program like VS Code? Inversely, is there any way that I can specify in the SVG XML my application generates that certain objects are to be locked when Illustrator imports it?

TOPICS
How to, Import and export

Views

28

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Locking elements in generated SVG XML

Explorer ,
Sep 16, 2020

Copy link to clipboard

Copied

I wrote a Lucee/CF application that generates SVG XML. The SVG my application generates imports beautifully into Illustrator 24.3. When I lock some objects in my imported SVG document in Illustrator, and then save the document back out as SVG, I can open the new SVG document, and Illustrator correctly recalls all of my locked objects. But I see nothing in the SVG XML that was saved by Illustrator that would indicate which objects are locked. Is the locked state of objects in documents that are saved as SVG stored in some other form or location in the document other than the SVG XML which I can read when opening the saved SVG document in a program like VS Code? Inversely, is there any way that I can specify in the SVG XML my application generates that certain objects are to be locked when Illustrator imports it?

TOPICS
How to, Import and export

Views

29

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Sep 16, 2020 0
Adobe Community Professional ,
Sep 17, 2020

Copy link to clipboard

Copied

The SVG file format in Illustrator is not meant for round-tripping. If it works, then fine, but there's no guarantee.

Which options do you select when saving the SVG file?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 17, 2020 0
Explorer ,
Sep 25, 2020

Copy link to clipboard

Copied

Here are the SVG Options I use when saving back out to SVG.

Screen Shot 2020-09-25 at 10.11.19 AM.png

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 25, 2020 0
Adobe Community Professional ,
Sep 25, 2020

Copy link to clipboard

Copied

"Preserve Illustrator editing" saves a full AI file into your SVG. So when opening the SVG, Illustrator opens that and ignores the SVG part. So of course you see all the correct stuff in Illustrator. The SVG is only visible to the outside.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 25, 2020 0