-
1. Re: How to remove custom shapes in a .twbx file?
Santiago SanchezApr 9, 2018 8:13 PM (in response to Ammy Vega Darya)
Hi Ammy,
There might be a better solution that this but... the shapes are saved on the XML of the Tableau Workbook, these 2 articles talk more about this:
All Your Shape are Belong to Us. | Tableau Public
Extract Custom Shapes from a Tableau Workbook - Clearly and Simply
If you unpackage the TWBX, you will see a TWB file that you can open in a text editor. You can then search for the <shapes> tag and you could remove anything within that tag. Please keep in mind that manually modifying the XML might break your worbook and Tableau support won't be able to help with that, always save a backup copy if you are going to modify the XML directly.
Hope that helps!
Santiago
-
2. Re: How to remove custom shapes in a .twbx file?
Peter Fakan Apr 9, 2018 8:33 PM (in response to Santiago Sanchez)Another tip to try would be to create a shape within the viz and reset it back to default shapes, then undo the shape and save the viz.
HTH
Peter
-
3. Re: How to remove custom shapes in a .twbx file?
Ammy Vega Darya Apr 10, 2018 1:34 AM (in response to Santiago Sanchez)Hi Santiago,
I have tried like what you suggested.
When I removed the codes within the <shapes> tag, it does reduce the size of .twb.
However, every time I save it (whether to format .twbx or .twb), the size still >300mb.
I am not sure why.
Thanks.
-
4. Re: How to remove custom shapes in a .twbx file?
Ammy Vega Darya Apr 10, 2018 1:34 AM (in response to Peter Fakan)Hi Peter,
Could you elaborate more about it?
I am not really understand about what you said.
Thanks.
-
5. Re: How to remove custom shapes in a .twbx file?
Peter Fakan Apr 10, 2018 3:21 PM (in response to Ammy Vega Darya)Hi Ammy,
My suggestion is to try to 'flush' any custom shapes out of Tableau by replacing them with stock shapes. By saving the viz after replacing the custom shapes with stock shapes this should reset the .twbx file size.
However, I am not convinced that the size of the viz is related to the shapes, I think it is something else. Appreciate if you could upload a sample so we can investigate.
HTH
Peter
-
6. Re: How to remove custom shapes in a .twbx file?
Santiago SanchezApr 10, 2018 5:53 PM (in response to Ammy Vega Darya)
Hi Ammy,
I haven't tested this but I have a theory on what may be happening... When you save the workbook Tableau grabs the custom shapes from your local computer (Documents\My Tableau Repository\Shapes) and adds them to the XML. So, even if initially you are able to reduce the size of the XML by erasing anything within the <shapes> tag, after you open in Tableau and save again the shapes are added back.
In thinking how to validate this, I would move any custom shapes out of the Documents\My Tableau Repository\Shapes folder (keep them on another folder so you don't lose them) and restart Tableau. Once you save, does the size of the TWB or TWBX change? If if doesn't, can you first erase the content within the <shapes> tag and then save (while keeping the custom shapes out of My Tableau Repository)?
Hope that helps! Wish I could think of an easier way but this is usually not a problem with smaller images or small number of images used for custom shapes.
Santiago
-
7. Re: How to remove custom shapes in a .twbx file?
Ammy Vega Darya Apr 10, 2018 8:42 PM (in response to Ammy Vega Darya)Hi guys,
I found the solution for this issue.
These are the steps that I did, and it works:
1. Open the original .twbx file (300mb).
2. Select on any images from the dashboard, then go to the sheet.
3. Double click on the custom shape (the image).
4. Hit reset on custom shape's pop-up dialog.
4. Click OK then try save the packaged workbook.
5. The size should be reduced now. (I got less than 10mb on the file).
Anyway, thanks guys for the suggestions.
Thanks.