Bricscad - open office integration

I am slowly switching over from Autocad to bricscad on linux. In my current Autocad setup (on windows) I have integrated MS office with Autocad  using VBA.

I am looking to do the same on linux. I know VBA/COM is not supported on linux so I'll do as much as I can on lisp.

I'm not sure how to setup the interprocess communication between bricscad and openoffice. Initially, I want to export attributes to openoffice calc for editing and then import them back into bricscad.

Any advice would be helpful at this stage.

Comments

  • I am slowly switching over from Autocad to bricscad on linux. In my current Autocad setup (on windows) I have integrated MS office with Autocad  using VBA.

    I am looking to do the same on linux. I know VBA/COM is not supported on linux so I'll do as much as I can on lisp.

    I'm not sure how to setup the interprocess communication between bricscad and openoffice. Initially, I want to export attributes to openoffice calc for editing and then import them back into bricscad.

    Any advice would be helpful at this stage.

    You might want to explain what you want a bit better - you're being quite vague. From what I understand though the easiest way would probably be to save the attributes as a csv file and then load them afterwards.
  • Appologies for being vague. But you're on the right track though. But instead of exporting to a csv first, the data is directly placed into a spreadsheet. This is currently done using vba/com under windows

    I have columns set up for attribute names and a row for each block. My current program creates that format and places an attribute string into a spreadsheet cell. Attribute names are stored in the first row and object handles are stored in the first column.

    So, for each block/text/mtext , the program searches each row for a matching object handle. if the handle is found, that row is over-written else appended to the rows. Similarly with each attribute,it seaches the column names (row1) to find the right column. if the name doesn't exist it is appended . Each attribute is then associated (in a table form) with an object and an attribute.

    Hope that makes sense.
  • Well the best I can suggest is the following. There might be a better way that I don't know of so anyone can correct me if I'm wrong. - Export the attributes as a CSV file (perhaps call it ".tempcsv" because the . will make it hidden in linux) - Open the CSV file with calc with something to the extent of code[/code]. Keep in mind that I don't actually know what the command is this is just speculation. - Edit any attributes you want to in calc and then save. - Reload the CSV file with a new command in Bricscad. I wrote a CSV loader for AutoLISP a while ago so you can probably base it on that: http://code.google.com/p/cencad/source/browse/trunk/readcsv.lsp . (Please bear in mind i was a terrible programmer when I wrote this and it was the first code I ever wrote in AutoLISP) That should be it. Good luck and I'll help if necessary. Regards, Daniel

  • Hi Phill,Did you ever give SQLitelsp a run? You could put all your data in database tables, then run queries on them to do updates or populate your attributes. There's a lot of good database managers out there for SQlite that should be able to import CSV's as well.A link with some of the functions https://forum.bricsys.com/discussion/11607Download link(bottom)https://forum.bricsys.com/discussion/16442Cheers : ) Dan

This discussion has been closed.