Replacing all shape texts (languages)

Started by luis_gomez, July 26, 2016, 04:48:18 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

luis_gomez

I am very familiar with VBA (mainly Excel). I am very short of time and your help will be of great value.  I need to perform the following:

I have a BPMN Diagram with about 500 task shapes. I need to produce the same diagram in at least 6 different languages. I have already prepared a CSV file with the following format:

1st row: the language I want to use.
2nd and so on: The page, the shape, Spanish, English, Portuguese, French, German, Polish

So the file would be like this:

1
Level 1, Shape1, Preparar, Prepare,...
Level 1, Shape2, Comprar, Buy,...
Level 1, Shape3, Producir, Produce
Level 1.1, Shape4, Limpiar, Clean,...
Level 1.1, Shape5, Pelar, Peel,...
...
...
Level 3.4.2.3, Shape499, Empacar, Pack,..
Level 3.4.2.3, Shape500, Enviar, Ship,...

This is easy on VBA, but Visio data model is crazy. How do I know the ID of the shape?, a lot of the diagrams were made by cut and paste, so if I go to Review and perform a Shape report I got a lot of repeated shape Ids.

Displayed Text                                                              Master Name              Shape ID   Shape Name
Def. Criterio clasificación de Proveedores (segmentación)"             Task                        18   Task
Criterio para definir proveedor Estrategico"                                 Task                        18   Task
Definición método selección del proveedor por Segmento"             Task                        18   Task
Identificación de criterios y variables por segmentación"             Task                        18   Task
Solicitar adecuaciones en DM de Proveedores"                             Task                        64   Task.64
Identificar tipo evaluación a realizar por proveedor (Sito/Planta)"     Task                        64   Task.64
Registro y análisis de tendencia de calificaciones"                             Task                        64   Task.64


Pseudocode
Open CSV file
read first row to determine selected language

Repeat
   read row
   replace text of shape(name) located in page(name) with data from selected language
Until EOF


Thats it!!!!. I just have scratched the data model trying to find how to solve the problem. No luck at all

Thank you in advance for your kind and prompt response.

Regards