Announcement

Collapse
No announcement yet.

As i dive (and sink) in the Revit API, i am learning...

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    As i dive (and sink) in the Revit API, i am learning...

    That you have to seek entertainment in the few lines of code that you manage to get working right.
    Attached Files
    Aaron "selfish AND petulant" Maller |P A R A L L A X T E A M | Practice Technology Implementation
    @Web | @Twitter | @LinkedIn | @Email

    #2
    hahaha... lol
    Actually, that is something I still cannot wrap my head around. How to automate an export of data. Just don't get it to work. I can batch import, place, and so on. But the stupid "find these geometry properties, collect them AND THEN EXPORT" is too much for my feeble brain...
    Martijn de Riet
    Professional Revit Consultant | Revit API Developer
    MdR Advies
    Planta1 Revit Online Consulting

    Comment


      #3
      Im not going to lie, i needed a serious amount of help. But the help i needed was all the freakin syntax that i just haveno in. Im finding the RevitAPI.chm manual extremely useful in finding the properties of objects. First, because im learning most stuff in the API isnt called what its called in the stupid program, and second, necause the Parameter names arent either, LOL.

      So far what it does it pretty basic. I need the EID and the GUID. It gets those, writes them to parameters even though i dont technically *need* the parameters yet, and then it exports the EID, GUID, and Type name to the CSV. Its a start.
      Aaron "selfish AND petulant" Maller |P A R A L L A X T E A M | Practice Technology Implementation
      @Web | @Twitter | @LinkedIn | @Email

      Comment


        #4
        Next step Aaron is bring it all back in lol.

        The good news is that you have the streamWriter class working to export and the StreamReader class is pretty much the same to bring it back in again
        Phillip Miller
        Kiwi Codes Solutions Ltd
        Makers of "Family Browser" and "Project Browser" for Revit.

        Comment


          #5
          Honey badger don't play!
          Dan

          Comment


            #6
            Originally posted by KiwiCodes View Post
            Next step Aaron is bring it all back in lol.

            The good news is that you have the streamWriter class working to export and the StreamReader class is pretty much the same to bring it back in again
            It sounds so easy when you say it, hahahaha.

            The "Bring it back in" is going to be a whole seperate button, so im basically going to take this entire thing and do a save as, and see if i can remember the right edits to make. The "bring it back in" doesnt need all the category lists, i dont think. Its going to just seek out the GUID's and edit parameter data based on what it finds in the StreamReader. Plus, all of that parameter data is Data Only (none of it affects geometry), so im thinking i shouldnt have to get too complicated with checking for strange occurances, other than stacked walls and groups...

            ::Nevergoingtosleepagain::

            Honey badger just TAKES what it WANTS! Thanks for the code, stupid!
            Aaron "selfish AND petulant" Maller |P A R A L L A X T E A M | Practice Technology Implementation
            @Web | @Twitter | @LinkedIn | @Email

            Comment


              #7
              Originally posted by Twiceroadsfool View Post
              It sounds so easy when you say it, hahahaha.
              Since you are diving in the API, the .net has some wonderful class methods.
              Besides CSV, have you tried other formats?
              From the moment I started using the System.Data classes, I needed a way of doing a file input/output for my DataTable and DataSet classes. And I found the ReadXML / WriteXML Method. The beauty of it is that the file maintains the data structure as a table, unlike a dumb CSV file.
              And yes, it is that easy. See DataTable.WriteXml Method (System.Data)
              I have been rewriting my code from scratch too many times. It's just like families. I have recreated my basic door family at least 30 times. As I learn something new that I find more productive (or elegant - as some programmers like to call it), I totally rewrite the code.
              And I am still in the beginning, after one year.
              From all the books that I have read about C#, the Yellow Book is by far the best from a beginners point of view.
              I found it long after I started writing code, and that meant the usual rewriting from scratch of most of my code.
              Most of the major concepts and principles are in the book, with a very simple and efficient explanation. And some nice humor.
              The latest (2011) can be found here: C Sharp Programming Course
              I found it more essential for starting than DevTV, or even the MSDN. It's in the same level as Jeremy Tammik blog: a must.
              Gonçalo Feio
              "Ignorance, ignorance, sheer ignorance - you know there's no confidence to equal it. It's only when you know something about a profession, I think, that you're timid and careful." George Orson Welles

              Comment


                #8
                Wow, nice! Ill get that book ASAP. Ive been looking for a good book that actually explains syntax and what each word in the line means. Unfortunately, the many API blogs and websites on C# ive found are way above my head. I need BASICS basics.

                As for pulling the data out... Were actuallu using CSV for a reason. It is crude, and simple, and not elegant... But its also something that hundreds of pieces of software can touch, and know what to expect. And- for what were trying to do with these crude apps were making- thats what i need for right now. Ive heard that XML and establishing some standards for what we want in each program will do it even better, but- of course- its another ratchet up the gear i have to get to first, haha.
                Aaron "selfish AND petulant" Maller |P A R A L L A X T E A M | Practice Technology Implementation
                @Web | @Twitter | @LinkedIn | @Email

                Comment


                  #9
                  Thanx Gonçalo! Downloaded it and looks great for people like me struggling to learn a foreign language... Finally a decent guide!
                  Martijn de Riet
                  Professional Revit Consultant | Revit API Developer
                  MdR Advies
                  Planta1 Revit Online Consulting

                  Comment


                    #10
                    Oh I love this quote out of the book!! Spot on.Programmer.PNG
                    Phillip Miller
                    Kiwi Codes Solutions Ltd
                    Makers of "Family Browser" and "Project Browser" for Revit.

                    Comment

                    Related Topics

                    Collapse

                    Working...
                    X