Current files to XML
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2014-02-21
02:49 AM
- last edited on
2023-08-01
04:30 PM
by
Doreena Deng
2014-02-21
02:49 AM
Hello,
I'm trying to write a plug-in that help to produce a XML file(s) of current objects to suit another tool of us. Therefore, some questions:
1. How can we add a type in the Save as... function (just like .aaa file). Is the API support?
2. How can we get all the objects info of the current files so I can use my function to convert them to my XML format? How can we do this with API.
I'm a little new here, so if anything wrong, pls suggest. Thanks so much.
I'm trying to write a plug-in that help to produce a XML file(s) of current objects to suit another tool of us. Therefore, some questions:
1. How can we add a type in the Save as... function (just like .aaa file). Is the API support?
2. How can we get all the objects info of the current files so I can use my function to convert them to my XML format? How can we do this with API.
I'm a little new here, so if anything wrong, pls suggest. Thanks so much.
Labels:
- Labels:
-
Add-On (C++)
2 REPLIES 2

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2014-02-24 10:00 AM
2014-02-24
10:00 AM
Hi,
Sure, you should check the ACAPI_Register_FileType function in the documentation.
What kind of infos do you want to export to your XML file?
Please check the Plan_Dump and the 3D_Test example Add-Ons.
Plan_Dump exports informations about elements in the current plan. 3D_Test exports the 3D model to a file. I think you should make something similar to on of those examples.
Regards,
Tibor
hoangvnn wrote:
1. How can we add a type in the Save as... function (just like .aaa file). Is the API support?
Sure, you should check the ACAPI_Register_FileType function in the documentation.
/** * Interface definitions. * * @return ArchiCAD error code. */ GSErrCode __ACENV_CALL RegisterInterface (void) { GSErrCode err = NoError; err = ACAPI_Register_FileType (1, 'TEXT', 'GSAC', "aaa", 0, ID_ResourceStrTable, IDS_ResourceFileTypeText, SaveAs2DSupported + SaveAs3DSupported); return err; } // RegisterInterface ()
2. How can we get all the objects info of the current files so I can use my function to convert them to my XML format? How can we do this with API.
What kind of infos do you want to export to your XML file?
Please check the Plan_Dump and the 3D_Test example Add-Ons.
Plan_Dump exports informations about elements in the current plan. 3D_Test exports the 3D model to a file. I think you should make something similar to on of those examples.
Regards,
Tibor
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2014-02-25 12:17 AM
2014-02-25
12:17 AM
Thanks so much for helping Tibor, I'll try now as your suggestion
