Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 4217

Access userdata created by DXF import

$
0
0

13 posts

Gero (gero) wrote:

Hi,

I imported some client's data from a DXF file. I contains some mesh objects with additional attributes assigned to them. By pressing the Details button in the object property window I get this output:

mesh  
  ID: fc9d0dc4-90cd-48eb-8055-5e33a79d661c (2076)
  Layer name: MROOT_OPTION 3TR_STO_01 JAN 2018
  Render Material: 
    source = from layer
    index = -1
  Geometry:
    Valid mesh.
    Closed double precision polygon mesh: 140 vertices, 60 polygons with normals
      bounding box: (116026,219029,9385.28) to (9415.11,219044,)
    Geometry UserData:
      UserData ID: 17F24E75-21BE-4a7b-9F3D-7F85225247E3
      Plug-in: c8cda597-d957-4625-a4b3-a0b510fc30d4
        description: ON_Mesh double precision vertices
        saved in file: yes
        copy count: 3

How can I access (read) this additional data? I tried RhinoPython:

>>> data = myMeshObj.Attributes.UserData
>>> print data.Count
1
>>> print data
<Rhino.DocObjects.Custom.UserDataList object ....

but there seems to be no way to get the actual data

I also tried VB - RhinoScript but here the data did not show up at all:

Rhino.IsObjectData(strObject); Rhino.IsAttributeData(strObject); Rhino.IsUserText(strObject)

did not show anything.

Any idea?

Regards, Gero.


Viewing all articles
Browse latest Browse all 4217

Trending Articles