Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Typing text in a text file, excel or a .CSV file. Then linking it to BricsCAD

Hello.
Has anybody got a plug-in or a method that allows text in BricsCAD to be linked to a .TXT, .CSV or an excel file?
CADig AutoField currently doesn't work with BricsCAD.

Regards
Dallas



Comments

  • To reference the content of a text file rtexts can be used.
    See: http://b-k-g.nl/bkg_rtext.html
  • Thanks for that Roy.
    Regards
    Dallas
  • Dear Dallas,

    In an email you have requested a solution for the display of custom texts in mtext fields. Since this is obviously related to this topic I have decided to answer here. That way more users can benefit from this information.

    I think there are two approaches that can work.

    A. Add custom dwg properties
    This is the easiest solution but the texts are stored in the drawing file.
    1.
    Start the _DWGPROPS command and on the 'Custom' tab add your own properties.
    2.
    When inserting a field expand the 'Document' node and select the name of a property.

    B. Use Lisp variables
    This solution requires some Lisp code, but once set up is quite flexible.
    See the attached zip file.
    1.
    If you already have an on_doc_load.lsp, add the content of the file in the zip to the existing file. You can enter this in the Command Bar to find the existing file:
    (findfile "on_doc_load.lsp")
    If you do not have an on_doc_load.lsp you can copy the file from the zip to a folder in the search path. If you are in doubt about which folder to use, you can use this one (enter code in the Command Bar):
    (vl-filename-directory (findfile "on_doc_load_default.lsp"))
    2.
    Copy the file FLV_Vars.lsp to a project folder (= folder with dwg files).
    3.
    Open FLV_Vars.lsp and change the path of the text file so that it point to an actual file. Note that you can also put your custom texts in FLV_Vars.lsp as demonstrated by the *FLV_MyText01* and *FLV_MyText02* variables.
    4.
    Open a drawing in the project folder. The Command Bar should now read: 'Field Lisp Variables (re)loaded'.
    5.
    To insert a Lisp variable as a field expand the 'Variables' node and choose "LispVariable'. The variables defined in FLV_Vars.lsp can now be selected.
    6.
    The code includes a command reactor which ensures that the Lisp variables are updates when certain commands are issued (_REGEN, _PRINT etc.).

    I hope this helps.

    Regards, Roy.
    www.b-k-g.nl

    Field_Lisp_Variables.zip

  •  Hi Roy.

    Thanks for the info and data. I'm going to learn LISP.

    Regards
    Dallas
  • ... You may need to add more commands to the list in the FLV_ReactorCallBack function.
    One obvious candidate: "UPDATEFIELD"
  • ROY. OK. 

    THANK YOU VERY MUCH. 

    NOW I HAVE TEXT LINKED TO A .CSV FILE CELL. OK. THAT .LSP FILE YOU WROTE IS  VERY USEFULL. I HAVE PAID MONEY FOR THIS FUNCTIONALITY WITH AUTOCAD IN THE PAST. 
     I DON'T UNDERSTAND WHY YOU CAN DO THIS SO QUICKLY AND A  SOFTWARE COMPANY WHO ADVERTISES CAN'T DO IT. 
    MAYBE THEY HAVE ISSUES WITH THE GUI. WITH AUTOIT I CAN SET THIS UP SO I CLICK A CELL AND IT PUTS AN MTEXT IN THE DRAWING FAST. 

    WELL DONE.

    REGARDS
    DALLAS




This discussion has been closed.
Origami
Origami is the Japanese word for paper folding. ORI means to fold and KAMI means paper and involves the creation of paper forms usually entirely by folding.

Powered by VanillaForums, Designed by Steam