Acad xData and Rhino user attribute exchange ISSUE

Hi, I am testing if I can bring xData from autocad to Rhino.
According to this doc:

So, I tried a bit. I created a line in autocad, and attached one xData with the key named ‘ana’.

With the command xdlist in autocad, I can show the value.

But when I import/ open this .dwg file, there’s no information in Attribute User Text

I am not sure which part I might do it wrong.
Any suggestion will be thankful.

Here is the test file I used.
Xdata_ana.3dm (21.8 KB)
Xdata_ana.dwg (31.9 KB)

I hope someone notice this post earlier, so I comment here once again thanks.

Not sure if this is relevant, the current Rhino version I am using is:

Rhino 7 SR18 2022-5-4 (Rhino 7, 7.18.22124.03001, Git hash:master @ b2a1120bcb32e1f6da66a421cd7162a18a9f0cd9)
License type: Commercial, build 2022-05-04
License details: Cloud Zoo

Windows 10.0.22000 SR0.0 or greater (Physical RAM: 31Gb)

Computer platform: LAPTOP - Plugged in [100% battery remaining]

Hybrid graphics configuration.
Primary display: AMD Radeon™ Graphics (AMD) Memory: 1GB, Driver date: 8-5-2021 (M-D-Y).
> Integrated accelerated graphics device with 3 adapter port(s)
- Windows Main Display is laptop’s integrated screen or built-in port
- Secondary monitor attached to adapter port #1
Primary OpenGL: NVIDIA GeForce RTX 3080 Laptop GPU (NVidia) Memory: 8GB, Driver date: 5-5-2022 (M-D-Y). OpenGL Ver: 4.6.0 NVIDIA 512.78
> Integrated accelerated graphics device with 4 adapter port(s)
- Video pass-through to primary display device

OpenGL Settings
Safe mode: Off
Use accelerated hardware modes: On
Redraw scene when viewports are exposed: On
Graphics level being used: OpenGL 4.6 (primary GPU’s maximum)

Anti-alias mode: 4x
Mip Map Filtering: Linear
Anisotropic Filtering Mode: High

Vendor Name: NVIDIA Corporation
Render version: 4.6
Shading Language: 4.60 NVIDIA
Driver Date: 5-5-2022
Driver Version: 30.0.15.1278
Maximum Texture size: 32768 x 32768
Z-Buffer depth: 24 bits
Maximum Viewport size: 32768 x 32768
Total Video Memory: 8 GB

Rhino plugins that do not ship with Rhino
C:\Users\aesth\AppData\Roaming\McNeel\Rhinoceros\7.0\Plug-ins\SpeckleRhino2 (8dd5f30b-a13d-4a24-abdc-3e05c8c87143)\SpeckleConnectorRhino.rhp “ConnectorRhino7” 2.5.1.14260
C:\Users\aesth\AppData\Roaming\McNeel\Rhinoceros\packages\7.0\EleFront\4.2.2\ElefrontProperties.rhp “ElefrontProperties” 1.0.0.0
C:\Users\aesth\AppData\Roaming\McNeel\Rhinoceros\packages\7.0\Karamba3D\2.2.0.14\Karamba3D_LicensePlugin_Rhino7.rhp “Karamba3DLicense”

Rhino plugins that ship with Rhino
C:\Program Files\Rhino 7\Plug-ins\Commands.rhp “Commands” 7.18.22124.3001
C:\Program Files\Rhino 7\Plug-ins\rdk.rhp “Renderer Development Kit”
C:\Program Files\Rhino 7\Plug-ins\RhinoRenderCycles.rhp “Rhino Render” 7.18.22124.3001
C:\Program Files\Rhino 7\Plug-ins\rdk_etoui.rhp “RDK_EtoUI” 7.18.22124.3001
C:\Program Files\Rhino 7\Plug-ins\rdk_ui.rhp “Renderer Development Kit UI”
C:\Program Files\Rhino 7\Plug-ins\import_ACAD.rhp “AutoCAD file import: import_ACAD”
C:\Program Files\Rhino 7\Plug-ins\NamedSnapshots.rhp “Snapshots”
C:\Program Files\Rhino 7\Plug-ins\RhinoCycles.rhp “RhinoCycles” 7.18.22124.3001
C:\Program Files\Rhino 7\Plug-ins\Toolbars\Toolbars.rhp “Toolbars” 7.18.22124.3001
C:\Program Files\Rhino 7\Plug-ins\3dxrhino.rhp “3Dconnexion 3D Mouse”
C:\Program Files\Rhino 7\Plug-ins\Displacement.rhp “Displacement”

I’m blown away that there is an “XDLIST” command in AutoCAD. I’ve been using AutoLISP to create/edit xdata but never imagined…

1 Like

Thanks for you reply. If possible, could you also provide what’s the autolisp code about? Thanks

Sorry for directly tag @dale , I have searched some posts and seems you might familiar with this issue I am facing. If not, I am so sorry for bothering and my rudeness.
And also thanks for your time.

Sincerely,
Jim

Just for update.
I found this post
https://mcneel.myjetbrains.com/youtrack/issue/RH-55484

I checked some behaviors in Rhino and Autocad.
Seems like
Rhino → Autocad (Rhino Attribute User String → Autocad Xdata), It works

but the other
Autocad → Rhino ( Can’t make it work yet.

It might because I used xdata to set one extend data directly but it didn’t know it’s a pair data. So I guess the part I should put more efforts in should be how to setup the pair xdata in Autocad directly.

To illustrate, now I can make xdata in Autocad like this, but it seems cannot be transformed into Attribute User String

While I checked the files which works fine, look like this

I followed the instruction in the thread, and get the result like this in autocad.

but still, there’s no Attribute User String in Rhino, and I don’t know the reason.

Here’s the file I used:
FollowTheInstructions.dwg (31.2 KB)

[Update]
I figured it out that maybe there’re some settings in Autocad document provided.

For say, I have two autoCAD files.


Where it works.

I attached the xdata to this curve.

It works fine if I put this rectangle curve in

  • user data to dwg - Copy.dwg

Where it doesn’t work

BUT if I put this curve in

  • FollowTheInstruction.dwg

Then SaveAs, there’s no User Attribute String in Rhino

My guess

It seems like there might be some document setting I should change to make it work from empty Acad → Rhino

BUT I don’t know where and what it is…
Any suggestions will be helpful.

Thank you.

1 Like

Here’s the files mentioned about:

FollowTheInstructions.dwg (32.5 KB)
user data to dwg - Copy.dwg (19.7 KB)

Hi @aesthetik0717,

I’ve logged an issue so we can have a developer look at this.

https://mcneel.myjetbrains.com/youtrack/issue/RH-69312

– Dale

1 Like

Thank you. Appreciate it

I’ve used it for a couple things but just playing around. If you’re wondering about the code itself AfraLISP.net is the best AutoLISP site out there (for tutorials).
I was using xData in conjunction with reactors (Reactors - Part 1 | AfraLISP) to create “Revit” style tags for objects. Worked wonderfully but only had limited testing (for example, if I had a large drawing with many objects it might have been laggy (lots of iterating through each object was required).

1 Like