I have created,
- custom shape (according how to create and edit shapes; also added a
name="my_unique_shape"
attribute to<shape>
tag, - added it to "scratchpad" library,
- named the new shape in scratchpad library; the same name as in shape attribute "my_unique_shape",
However when I want to insert shapes through CSV (using the reference CSV from Examples: Import from CSV to draw.io diagrams) it can't find the shape id. The CSV I'm using for test purposes is:
## My Unique Shape# style: shape=%shape%;fillColor=%fill%;strokeColor=%stroke%;verticalLabelPosition=bottom;aspect=fixed;# namespace: csvimport-# width: 100# height: 100# ignore: id,shape,fill,stroke,refs# nodespacing: 40# levelspacing: 40# edgespacing: 40# layout: horizontaltree## CSV data starts below this lineid,name,fill,stroke,shape,refs1,Unique Name,#ffe6cc,#d79b00,my_unique_library.my_unique_shape,
When I change the last line to use a default shape mxgraph.aws4.cognito
it works just fine:
1,Unique Name,#ffe6cc,#d79b00,mxgraph.aws4.cognito,
Also tried to create a New Library, adding the shape to it, and naming the shape in the library; without any luck either
Additional questions:
- The same question also applies how to address shapes in custom libraries?
- Are the shapes addressed by their names in the library or names in the
<shape>
XML tag? - If by their shape names in the library, then how can I reference name with a blank?
- How do I find the name/id of shapes in stock libraries?