I am looking for a way to export SVG files from Rhino that retain the Object Name. This will allow me to bring floor plans from Rhino into Power BI that attach back to room data created in Excel using Synoptic Designer.
Currently, I can bring a Rhino floor plan into Illustrator via either .ai or .svg export and manually add object names to attach to closed room polylines. I would much rather automate this using Grasshopper and export the .svg file including object names into Synoptic to then visualize in Power BI.
Does anyone know how the Rhino exporter writes .svg files so I can properly attach data before exporting?
See attached for the “Synoptic Designer” interface, which receives an .svg file and reads the “Name” in the first row, pointed out in red on that screenshot.
In Illustrator, if I select a closed path and change the name of the path and then export the file to .svg, Synoptic will read that path name in the proper row.
What I want is to export a Rhino file to either an Illustrator or an .svg file such that the name comes in automatically (in this example, that would mean every polyline currently shown as “<Pa.th>” in Illustrator would instead be the room number). I can get Grasshopper to apply attributes in basically whatever configuration is needed to accomplish this, as long as the exporter retains the right data in the .svg file.
I don’t fully understand your question; I don’t know much about SVG files. Here is an example of an SVG file opened in Illustrator with Names properly attached to each polyline:
Next step, I have opened that .svg in Illustrator and renamed the path, and exported again. Text editor shows the composition of that .svg file has changed significantly and now includes the path id:
No it is not a typo “d” is where the geometry is put.
From what I understand
In Designer the first text is ID
and the second is Title
Here what is inside a rhino geometry
Strangely Rhino is reading ID of SVG and put it in the name of Rhino object and it seems it doesn’t output when it export SVG. @wim could it be impoved in the next release of Rhinoceros ?
2 files
Yes, would love to see this implemented. I cannot think of a good workaround as of now; years ago Doodlebug for Grasshopper maybe could have assisted in naming objects inside of an Illustrator file, thereby relying instead on the Illustrator SVG exporter which would be better for Synoptic. Without being able to export this info to SVG from Rhino, I don’t know how to accomplish this workflow.
I have to believe there is some way to script the Path ID or Title with one of these, can anyone out there think of a workaround? I can send each path to a new Rhino layer and then to Illustrator, but that send each path to an SVG Group which Synoptic doesn’t seem to like inside of Power BI.
Yes it is mine it is why I asked. You are the first to ask and it is very simple to do it I manage to do it tonight in the project I have for Rhino 6.
It put in an ID attribute having the Rhinoceros Object Name.
Not really tested !! Seems to work on Rhino6
This is great, thank you! Except I am seeing that it retains layers by grouping SVG geometries; Synoptic seems to prefer simple files with just paths and no groups. Would it be possible to have the exporter only include the item name? Otherwise all geometries seem to be put under a layer name.
Yes this is one of the advantage of my plugin other the Rhino plugin !!
Let’s wait some day to see if Rhino team could add the Name in the ID. They use it when reading SVG so they could also output it when exporting. And they also didn’t use the grouping !
I suppose it could but, as you say, it’s not very often this request is made. We’ve had it on the list for a while and I’ve added this thread: RH-40791 Option to use object name as tag in SVG export
Added to the list: RH-71860 File IO: SVG Export - Add option to not group by layer
-wim