View Full Version : 'Xdata' resources?
hand471037
2004-08-18, 06:07 PM
Hey, so, after talking with Matt & David at last night's user group meeting, I learned that there is Material ID info within the DXF/DWG file that Revit exports, contained within the 'Xdata' within. I'm optimistic that I'll be able to use this data out of the DXF to make a more automatic 'bridge' to exporting to Radiance, so that eventually I'll be able to export from Revit to a DXF, and then run a tool that takes that DXF and turns it into Radiance files.
Now, where can I learn more about 'xdata' without being part of the ADN? ;) Anyone got any resources and/or guides? I would have posted this into the 'Programming' forum, but it's not concerning VBA, ARX, or, god forbid, LISP. :P
Danny Polkinhorn
2004-08-18, 06:40 PM
Jeff,
You can find information about xdata in the ActiveX Help file for AutoCAD. Unfortunately, it does concern VBA, ARX or Lisp because that's the only way to get to the data (if you want to use it for anything other than Max or Viz).
Hope that helps,
Danny Polkinhorn
2004-08-18, 07:11 PM
Jeff,
Here's a VBA file that will show you the data. I have no idea what the numbers are, but maybe you do. I gather that they're probably Object IDs but that doesn't really help without knowing what the IDs are.
Drag this into AutoCAD 2005 to load it. Type in VBARUN, and choose RevitXdata to run. Select an object that was exported from Revit, and you'll see the data.
Don't worry Scott, it's not a virus! ;)
hand471037
2004-08-18, 07:34 PM
Danny, are you certain that you need AutoCAD to see the xdata? I've been parsing DXF's, and it looks like it's in there too, plaintext. But I might not be getting all of it. Mostly what I need is a material ID tied to a polyface mesh, so that I can redefine my materials within Radiance easily. Then, in the future, I could even make a database of 'equvelent' materials so that something that's called out to use a certain material within Revit automatically maps to a certain Radiance material...
Also, I'm trying to see if this can work sans AutoCAD, due to two things: One, that I'd love to make this 'bridge' tool be platform-independant so that I can have it running on a render server or something and not require an additional AutoCAD licence, and Two making something like this will be a major learning excersise for me, and thusly I'd like to learn something I might be able to use again somewhere else for other ideas I've got, rather than wasting time learning the esoteric and special needs of VBA/ARX/LISP within AutoCAD.
Thanks for the resource, I'll start reading up on the Acad help files!
Danny Polkinhorn
2004-08-18, 11:41 PM
Jeff,
I was assuming that AutoCAD would be part of the workflow. Certainly DXF files are an open format and you can read the data in any supporting application. AutoCAD just puts a graphical front end on the DXF data. Radiance may not have integrated access to the xdata from within the app since xdata is really an Autodesk thing (but I don't know anything about Radiance).
Since the xdata is also part of a DWG export, perhaps you could use this in the future to enhance the integration of AutoCAD. In fact I have something I'm working on that might make use of this data. Do you or anyone at the factory have any information on the format of the xdata or the IDs used or what they reference?
Thanks,
hand471037
2004-08-19, 12:54 AM
Well, I'm not looking to integrate Autocad. I'm actually trying to get away from it altogether. As a matter of fact, I'd be overjoyed to never have to use it again for any reason. I'm not a Revit zealot or anything, I've just spent too many years and brain cells on putting up with Autocad, and have never liked it (even though I used to teach it) and now that I've got access to better alternatives I really don't want to ever go back. ;)
Radiance uses it's own 3D format that's specialized and unique to it. Anything you want to bring into Radiance has to be translated into it's format. However, Radiance isn't a monolithic application; it's actually a collection of thirty or so command line tools that run within a Unix/Linux shell. It's also open source, and it's file format is plaintext, as is DXF. There is a tool that converts DXF's to Radiance files, however it doesn't take xdata into account, and only seems to work with smaller models saved in older DXF formats (it's out of date).
Since both DXF & Radiance formats are plaintext and open standards it seems, to me, that once I understand DXF I'll be able to write a tool that simply takes the polyface meshes from the DXF and converts them into Radiance faces while taking into account the material ID xdata from within the DXF. And this tool can just be a little command line job, heck I might even be able to do it with a Bash script, and it will work seamlessly with all the other Radiance and Unix/Linux stuff.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.