sketchucation logo sketchucation
    • 登入
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    ⚠️ Important | Libfredo 15.8b introduces important bugfixes for Fredo's Extensions Update

    [Plugin] Export Cpoints to CSV v1.0 20110913

    已排程 已置頂 已鎖定 已移動 Plugins
    28 貼文 6 Posters 17.7k 瀏覽 6 Watching
    正在載入更多貼文
    • 從舊到新
    • 從新到舊
    • 最多點贊
    回覆
    • 在新貼文中回覆
    登入後回覆
    此主題已被刪除。只有擁有主題管理權限的使用者可以查看。
    • jemagnussenJ 離線
      jemagnussen
      最後由 編輯

      Hi again,

      Just a question, is it somehow possible to force the numbers of decimals to say fixed 3 decimals on all the 3 figures (LLZ)?

      Best regards
      Jesper

      HP ZBook 15, Windows 10 64 bit
      Intel Core i7-6820HQ @ 2.70GHz
      32 GB Ram
      NVIDIA Quadro M2000M

      1 條回覆 最後回覆 回覆 引用 0
      • TIGT 離線
        TIG Moderator
        最後由 編輯

        @jemagnussen said:

        Hi again,

        Just a question, is it somehow possible to force the numbers of decimals to say fixed 3 decimals on all the 3 figures (LLZ)?

        Best regards
        Jesper

        To export to 3dp always including trailing .000 would be possible... BUT the XYZ code would need revisiting - I'll come back later today when I have a moment...

        TIG

        1 條回覆 最後回覆 回覆 引用 0
        • TIGT 離線
          TIG Moderator
          最後由 編輯

          Here's the updated version
          (c) TIG 2011
          Type
          Exportcpoints2tsv.new
          in the Ruby Console.
          Exports all Cpoints is a Selection to a X,Y,Z 'TSV' file.
          The sep="\t", the decsep=',' and ext='tsv'.
          Change decsep='.' IF you want 1.234 rather than 1,234 OR run with arguments
          as shown below...
          Model Units are used and get exported to the TSV in say meters as 1,234 -
          it always forces 3dp even when not needed - e.g. 0,100
          Check that your locale Excel uses ','/'.' matching your output.
          You can affect output by adding an argument to the command line, e.g.
          It returns XYZ format by default BUT if you type
          Exportcpoints2tsv.new 1
          it will then use YXZ format.
          To change from ',' to '.' as the decimal separator, type
          Exportcpoints2tsv.new 2
          To change from ',' to '.' as the decimal separator AND use YXZ, type
          Exportcpoints2tsv.new 3

          1.0 20110914 First issue.
          1.1 20110915 Forces 3dp always, command-line argument to change format.Exportcpoints2tsv.rb

          TIG

          1 條回覆 最後回覆 回覆 引用 0
          • jemagnussenJ 離線
            jemagnussen
            最後由 編輯

            Hi TIG,

            Voila... that did the trick, now I get the decimals, also from the model that is geolocated so this is really a big help. Can't thank you enough for your kind assistance.

            Have a lovely day,
            Best regards
            Jesper

            HP ZBook 15, Windows 10 64 bit
            Intel Core i7-6820HQ @ 2.70GHz
            32 GB Ram
            NVIDIA Quadro M2000M

            1 條回覆 最後回覆 回覆 引用 0
            • TIGT 離線
              TIG Moderator
              最後由 編輯

              I get there eventually 😉

              TIG

              1 條回覆 最後回覆 回覆 引用 0
              • W 離線
                wsellers89
                最後由 編輯

                Sorry to bother you, but I got referred to this post from the newbie section. I had asked the following:

                I am laying out a porous plate and was wondering if there is an easy way or perhaps a script that will read the construction points (e.g. centerpoints) of each of the circles representing the holes. If it could write out the points to a file would be great, but if it would print to the console -- I could write them down. There are a couple of hundred holes that is why I would like to automate this.

                Operating system: Mac OS X
                SketchUp version: V8

                This script sounds exactly like what I need. I placed the ruby script in the Main folder:
                MacHD/Applications/Library/Application Support/Google SketchUp 8/SketchUp/plugins/

                but when I relaunch SketchUp I don't see the script in the Plugins pull down menu. Am I missing something?

                Sincerely,
                Bill

                1 條回覆 最後回覆 回覆 引用 0
                • GaieusG 離線
                  Gaieus
                  最後由 編輯

                  The instruction says

                  @tig said:

                  Type
                  Exportcpoints2csv.new
                  in the Ruby Console...

                  Open the ruby console from the window menu and simply copy paste that line there (at the bottom) then press enter

                  Gai...

                  1 條回覆 最後回覆 回覆 引用 0
                  • TIGT 離線
                    TIG Moderator
                    最後由 編輯

                    As Gaieus said... it's a rarely used tool, so it is used without a menu item - as explained in the instructions on the download page...
                    Type
                    Exportcpoints2csv.new
                    in the Ruby Console.

                    You can export any selected cpoints to CSV using this 'Export CSV' tool...

                    To mark all of the selected Arcs/Circles centers with cpoints, BEFORE you do that final CSV export, you can run this one liner: Copy/Paste the code into the Ruby Console + <enter>

                    m=Sketchup.active_model;ae=m.active_entities;s=m.selection;as=[];s.each{|e|next unless e.kind_of?(Sketchup;;Edge)and e.curve and e.curve.kind_of?(Sketchup;;ArcCurve);as<<e.curve};as.uniq.each{|ar|ae.add_cpoint(ar.center)}
                    

                    A cpoint is added to every Arc/Circle's center for you, select them.
                    The 'Export CSV' tool filters for only cpoints so you don't need to be too carefully making the selection as long as you include the cpoints you want...

                    TIG

                    1 條回覆 最後回覆 回覆 引用 0
                    • 1
                    • 2
                    • 2 / 2
                    • 第一個貼文
                      最後的貼文
                    Buy SketchPlus
                    Buy SUbD
                    Buy WrapR
                    Buy eBook
                    Buy Modelur
                    Buy Vertex Tools
                    Buy SketchCuisine
                    Buy FormFonts

                    Advertisement