Forum de la communauté Allplan

[Question] Scripting - Export CSV of Attributes and values from elements


Hi all,

How to do a visual scripting in order to perform an export to CSV of all attributes and values of elements?

Thanks a lot!
Xavier Coll
EiPM

Xavier Coll • Architect, Project Manager I+D, BIM Manager, BIM Auditor
EiPM • http://www.eipm.es/en/

Show most helpful answer Hide most helpful answer

@Horst:
Starting the above example scripts from the library palette fails!
The export to xml don't contain the types of values (csv cannot transport this information)
So at further processing you have to guess the values, like excel do it at reading a cvs! (see example_xml.png)
That' the reason why the direct xls-export in Allplan was years overdue!

Some general comments:
I would like to see the visual scripting in Allplan more oriented to the "original", e.g. Grashopper or Dynamo.
One very important point is that each node usually has only one output, because exactly one output data stream is generated from the input data streams. The Allplan approach with looped-through outputs unnecessarily complicates the visual graphics! The input capability at the outputs(!) is also not really meaningful! All this unfortunately makes working with VisualScripting not really intuitive! (see workspace.png)

A display node would be helpful for "debugging" the data streams.
For the "playful form-finding" slider-controls are also important in the palette! (see slider.png)

You can have a look at the complete source code of Dynamo at Github to search for meaningful nodes. In particular, Allplan still lacks important geometry nodes for facade design and DGM-modelling:
-subdivide planar and nurbs-surfaces
-projecting a point or curve onto a surface
-place elements along a curve or onto surface
-triangulation of surfaces
-meshing of points (voroni , delaunay with break lines)
-straight skeleton creation (Link) for roofs

The focus should be more on geometry creation!
Other functions, like reading or writing attributes, should be left in the Python API!
Something like this becomes very complicated in Visual-Scripting, because you have to handle with input states in the GUI!
A good example for this is PAUSE-Node used in the above described export-nodes! (without inserting this node, Allplan crashes!)
This node isn't existing in Grasshopper or Dynamo! The paradigma of visual scripting is evaluation of a data flow schema!
No states, no inputs and no loops during the flow! Only data flow, nothing else...!

The same applies to the try of create reinforcement with visual scripting!

Pièces-jointes (3)

img
Workspace.png
Type: image/png
Téléchargé 37 fois
Size: 103,30 KiB
img
example_xml.png
Type: image/png
Téléchargé 22 fois
Size: 159,03 KiB
img
slider.png
Type: image/png
Téléchargé 27 fois
Size: 243,03 KiB
1 - 8 (8)
  • 1

For example, I would like to do a csv export like the image attached with this image.

Xavier Coll • Architect, Project Manager I+D, BIM Manager, BIM Auditor
EiPM • http://www.eipm.es/en/

Pièces-jointes (1)

img
Snap2.png
Type: image/png
Téléchargé 25 fois
Size: 10,02 KiB

By now, I've only got some geometrical attributes...

Someone knows how to export attributes to CSV? maybe visual scripting still doesn't have enough nodes about attributes.

I upload my progression.

Xavier Coll • Architect, Project Manager I+D, BIM Manager, BIM Auditor
EiPM • http://www.eipm.es/en/

Pièces-jointes (2)

img
Sample.png
Type: image/png
Téléchargé 43 fois
Size: 210,64 KiB
Type: text/xml
Téléchargé 98 fois
Size: 3,41 KiB

Hi Xavier,

are you able to Export from Excel to CSV?
In this case, you could firs Export from Allplan to Excel...

Pièces-jointes (1)

img
001.JPG
Type: image/jpeg
Téléchargé 29 fois
Size: 39,19 KiB

Good morning minisci_kuk, and thanks for your answer!

We know "Export Attributes" tool, but we want to do some special processes in order to be more efficient,:
- Try to export several attributes
- Create new attributes, and add values from formulas (concatenate, or other)
- Export / Import attributes involves too much manual processes, and "visual scripting" can do them more automatically and efficient, we think.

The final scope for those processes is create a enriched IFC with data stored in Psets from client requirements.

Best regards,
Xavier Coll
EiPM

Xavier Coll • Architect, Project Manager I+D, BIM Manager, BIM Auditor
EiPM • http://www.eipm.es/en/

Hi Xavier,

in 2020-1-3 we have added VisualScripting nodes for the attribute export to cvs and xml files. Please have a look at the examples ExportAttributesToCSV and ExportAttributesToXML.

If you need more functionality, please let us know.

Best regards
Horst

Hi Horts and thanks for your answer!

Very interesting! We will check ExportAttributesToCSV and ExportAttributesToXML nodes.

Cité par Horst_Hohmann
If you need more functionality, please let us know.

In our office, usually we use an other "Visual scripting" tool: Dynamo. With this tool, we have developed a lot of "visual scripts" for our projects. Our last BIM project it was develop a BIM infraestructure of 6.000 km of roads, for a local public administration, and it was developed in several complex Dynamo scripts. In this case, this project was around three keys: synthetic geometry (the roads are splitted every 10 meters), a huge of data, and we develope an interface of visualization and data management.

Then, we would like to do some similiar processes that we do in Dynamo, but with Allplan Visual Scripting. We are not interested only in modeling processes, also we are very interested around data management, and increase the quality of IFC data. In order to start to do it, we have some questions...

In Dynamo, there are two very simple nodes, but very powerful:
- Node "code block": it let to create a lot of simple things, for example, lists.
- Node "Watch": it shows a preview of the output list of a node, it's really very useful.

Are there a similar nodes in Allplan "Visual scripting"?
I upload and image of Dynamo, with those simple but super powerful nodes (and also the dyn file)

Thanks a lot!
Xavier Coll
EiPM

Xavier Coll • Architect, Project Manager I+D, BIM Manager, BIM Auditor
EiPM • http://www.eipm.es/en/

Pièces-jointes (2)

img
Code_Block_and_Watch.png
Type: image/png
Téléchargé 30 fois
Size: 68,89 KiB
Type: text/plain
Téléchargé 34 fois
Size: 8,40 KiB

@Horst:
Starting the above example scripts from the library palette fails!
The export to xml don't contain the types of values (csv cannot transport this information)
So at further processing you have to guess the values, like excel do it at reading a cvs! (see example_xml.png)
That' the reason why the direct xls-export in Allplan was years overdue!

Some general comments:
I would like to see the visual scripting in Allplan more oriented to the "original", e.g. Grashopper or Dynamo.
One very important point is that each node usually has only one output, because exactly one output data stream is generated from the input data streams. The Allplan approach with looped-through outputs unnecessarily complicates the visual graphics! The input capability at the outputs(!) is also not really meaningful! All this unfortunately makes working with VisualScripting not really intuitive! (see workspace.png)

A display node would be helpful for "debugging" the data streams.
For the "playful form-finding" slider-controls are also important in the palette! (see slider.png)

You can have a look at the complete source code of Dynamo at Github to search for meaningful nodes. In particular, Allplan still lacks important geometry nodes for facade design and DGM-modelling:
-subdivide planar and nurbs-surfaces
-projecting a point or curve onto a surface
-place elements along a curve or onto surface
-triangulation of surfaces
-meshing of points (voroni , delaunay with break lines)
-straight skeleton creation (Link) for roofs

The focus should be more on geometry creation!
Other functions, like reading or writing attributes, should be left in the Python API!
Something like this becomes very complicated in Visual-Scripting, because you have to handle with input states in the GUI!
A good example for this is PAUSE-Node used in the above described export-nodes! (without inserting this node, Allplan crashes!)
This node isn't existing in Grasshopper or Dynamo! The paradigma of visual scripting is evaluation of a data flow schema!
No states, no inputs and no loops during the flow! Only data flow, nothing else...!

The same applies to the try of create reinforcement with visual scripting!

Pièces-jointes (3)

img
Workspace.png
Type: image/png
Téléchargé 37 fois
Size: 103,30 KiB
img
example_xml.png
Type: image/png
Téléchargé 22 fois
Size: 159,03 KiB
img
slider.png
Type: image/png
Téléchargé 27 fois
Size: 243,03 KiB
1 - 8 (8)
  • 1

https://connect.allplan.com/ utilise des cookies  -  Plus d'informations

Accepter