sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    [Plugin] importDXFtext

    Scheduled Pinned Locked Moved Plugins
    165 Posts 18 Posters 84.8k Views 18 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • uwesketchU Offline
      uwesketch
      last edited by

      Whow, that was quick. I tested.

      The TEXT is back, but the Block Attribute Text is now gone 😲
      For the file "dxf issues with special chars.dxf"
      with version 3.4:

      8 STYLES:
      16 LAYERS:
      0 TEXT ENTITIES:
      11 MTEXT ENTITIES:
      16 ATTRIBUTE TEXT ENTITIES:
      ...
      Making 0 TEXT Entities...
      Making 11 MTEXT Entities...
      Making 16 ATTRIBUTE TEXT Entities...

      with version 3.8:
      8 DXF STYLES:
      16 DXF LAYERS:
      0 TEXT ENTITIES:
      11 MTEXT ENTITIES:
      16 ATTRIBUTE TEXT ENTITIES:
      ...
      Making 0 TEXT Entities...
      Making 11 MTEXT Entities...

      ...

      For the file "map with Isocontours TEXT.dxf"
      with version 3.4:
      4 STYLES:
      67 LAYERS:
      74 TEXT ENTITIES:
      25 MTEXT ENTITIES:
      436 ATTRIBUTE TEXT ENTITIES:
      ...
      Making 74 TEXT Entities...
      Making 25 MTEXT Entities...
      Making 436 ATTRIBUTE TEXT Entities...

      with version 3.8:
      4 DXF STYLES:
      67 DXF LAYERS:
      74 TEXT ENTITIES:
      25 MTEXT ENTITIES:
      436 ATTRIBUTE TEXT ENTITIES:
      ...
      Making 74 TEXT Entities...
      Making 25 MTEXT Entities...

      ...

      1 Reply Last reply Reply Quote 0
      • TIGT Offline
        TIG Moderator
        last edited by

        Aargh!
        I disabled the ATEXT for quicker testing...
        But I thought I set it back on !!! typo !!!

        Here's v3.9 that's fixed.
        I also added different names for the types of DXF text used to make the groups [TEXT..., MTEXT..., ATEXT...], so it's easier to find the type etc...
        https://sketchucation.com/pluginstore?pln=importDXFtext

        TIG

        1 Reply Last reply Reply Quote 0
        • uwesketchU Offline
          uwesketch
          last edited by

          No problem. Shit happens ,-) and for this I test πŸ˜„

          Another issue came now back.
          The shift of the 3D-Text in case there are letters going beyond the writing base line:
          Issue with letters going beyond the base line

          The type of text is helpful. Could you also add the content of the text somewhere?
          Then I could even search for a specific 3DText. It does not have to be the full text. Maybe the first 20 chars, so that the outliner does not yet get a horizontal scroll bar?
          add 3DText value to group name

          1 Reply Last reply Reply Quote 0
          • TIGT Offline
            TIG Moderator
            last edited by

            The -ve sign should move up ??
            Weissputz has a downstanding 'p' again they should push up ??
            I'll investigate...

            TIG

            1 Reply Last reply Reply Quote 0
            • uwesketchU Offline
              uwesketch
              last edited by

              @tig said:

              The -ve sign should move up ??
              Weissputz has a downstanding 'p' again they should push up ??
              I'll investigate...

              Yes, it worked in version 3.6. All nicely shifted up. Including characters like Β°'`^". They were shifted up to the top.

              1 Reply Last reply Reply Quote 0
              • TIGT Offline
                TIG Moderator
                last edited by

                Investigating...

                TIG

                1 Reply Last reply Reply Quote 0
                • TIGT Offline
                  TIG Moderator
                  last edited by

                  Here's v4.0
                  https://sketchucation.com/pluginstore?pln=importDXFtext
                  It fixes that text alignment glitch I just reintroduced !!

                  TIG

                  1 Reply Last reply Reply Quote 0
                  • uwesketchU Offline
                    uwesketch
                    last edited by

                    Much better. Thanks. πŸ˜„

                    in the test file "dxf issues with special chars.dxf" there are now only two issues left.

                    The text "Knickarmmarkise" has the attachment point in the "middle center", but I think you take the point "left center". Therefore the text is shifted to the right. Can you implement the attachment point "middle center" / "right center"?
                    In below screen shot, green is the position where it should be, red the position produced by version v4.0
                    wrong attachment point.

                    The large text starting with "Masse am Bau:" is nicely aligned left, but it is shifted downwards by exactly one letter height. In version 3.4 (to which I compare version 4.0) this was correctly placed.
                    In below screen shot, green is the (correct) position from version 3.4, red the position produced by version 4.0.
                    text shifted by one letter height downwards

                    P.S. TEXT entities still not working properly:
                    version 4.0, says in the console, it is doing TEXT, but they are not created in SketchUp!
                    I get :
                    ...
                    74 TEXT ENTITIES:
                    ...
                    Making 74 TEXT Entities...
                    Making 25 MTEXT Entities...
                    Making 436 ATTRIBUTE TEXT Entities...
                    ...

                    BUT: the TEXT entities are NOT CREATED in SketchUp.

                    1 Reply Last reply Reply Quote 0
                    • TIGT Offline
                      TIG Moderator
                      last edited by

                      The text "Knickarmmarkise" has the attachmentpoint [71] in the "middle right" - i.e. set to 6
                      Which is MR - the associated Ruby align assignment is flaky !
                      As it doesn't reset it properly I've rewritten that code - should work now...
                      Please check...

                      The alignment of the "Masse am..." text is more complex as its alignment is set to TR 3 and there are 2no \P characters in the string - equivalent to \n newline in Ruby - that splits the text-string into its 'lines'...
                      Please test as I'm not sure this update fixes it, because the number of lines in a string affect the overall group's height and sometimes this might mess up vertical alignment adjustments ??
                      If if does mess up, then I have to look at analyzing the string for \n and adjust any vertical alignment accordingly [using string.lines.count etc]

                      Here's v4.1
                      https://sketchucation.com/pluginstore?pln=importDXFtext

                      TIG

                      1 Reply Last reply Reply Quote 0
                      • uwesketchU Offline
                        uwesketch
                        last edited by

                        The "Knickarmmarkise" is now good and yes, the attachment point is 6, not 5.

                        But all other MTEXTs are now either a bit off or completely off.
                        It looks like that the higher the rotation angle the more off the text is placed.
                        The "SN Q4" texts are about 26meter off, the dimension value 17^5 is 23m off, the 1.24^5 dimension value is 34meter off. the "OK Mauer ca. 549.79" is about 6m off to the right.

                        The "Masse am Bau:" has not changed position compared to version 4.0.
                        BTW in version 3.4, 3.5, 3.6, etc it was correct. Can you not compare to the code of v3.4?

                        1 Reply Last reply Reply Quote 0
                        • TIGT Offline
                          TIG Moderator
                          last edited by

                          One step forward, one step back !

                          I'll investigate...

                          TIG

                          1 Reply Last reply Reply Quote 0
                          • uwesketchU Offline
                            uwesketch
                            last edited by

                            Thanks. Can you also look into why TEXTs are not created anymore in SketchUp, even though in the console it says that "Making .. TEXT Entities"
                            ?

                            1 Reply Last reply Reply Quote 0
                            • TIGT Offline
                              TIG Moderator
                              last edited by

                              Another problem !

                              TIG

                              1 Reply Last reply Reply Quote 0
                              • TIGT Offline
                                TIG Moderator
                                last edited by

                                I'll look at the alignment issue shortly...

                                However, the current TEXT import does work for me, albeit with text pieces miles from the origin, making selecting / viewing / editing them very awkward [even with the help of the Outliner] - when using your TEXT dxf example - is this the issue you are referring to ?
                                e.g. the first piece of TEXT processed is -
                                X = 2677161.876174174 [42.25 miles from the origin] Y = 1237562.802 ... Text = "430287"

                                Also note that in that file several ATTRIBS also have no 'string' at all [code 1] - the omission is in the DXF file, not the ruby side...

                                TIG

                                1 Reply Last reply Reply Quote 0
                                • uwesketchU Offline
                                  uwesketch
                                  last edited by

                                  Yes, it is the file called map with Isocontours TEXT.dxf.
                                  I am running with v4.1
                                  after the import finished, I see only 250 sub groups. 225 ATEXT and 25 MTEXT.
                                  They are either called "ATEXT #..." or "MTEXT #...".
                                  But there are no sub groups called "TEXT #..." in the outliner.

                                  The first TEXT entry listed in the console is:

                                  Layer = 01139
                                  Color = 0
                                  X = 2677161.876174174
                                  Y = 1237562.802
                                  Z = 0.0
                                  Height = 0.9999999999999997
                                  Text = 430287
                                  Oblique = 15.0
                                  Justification_H = 2
                                  Justification_V = 2
                                  Style = STANDARD
                                  Rotation = 0.0

                                  Yes, the origin is far off. This is the Swiss coordinate system LV95.

                                  There are or instance two TEXT called Rinderweidstrasse and Rinderweidweg. These should be easily visible in Sketchup in the very top right of he imported group, but they do not exist.
                                  (choose parallel projection, top view, then in the outliner select an ATEXT and then "yoom selection" in the context menu)
                                  BTW, the first 12 MTEXT are in the bottom left corner of the group near the Origin, the other MTEXTs and the ATEXTs are in the top right corner of the group.

                                  1 Reply Last reply Reply Quote 0
                                  • TIGT Offline
                                    TIG Moderator
                                    last edited by

                                    Here's v4.2
                                    https://sketchucation.com/pluginstore?pln=importDXFtext
                                    Which attempts to address some of the recent issues...
                                    Please test and report...

                                    TIG

                                    1 Reply Last reply Reply Quote 0
                                    • uwesketchU Offline
                                      uwesketch
                                      last edited by

                                      I tested v4.2: better again πŸ˜„

                                      TEXTs are still not imported, the console output is a bit different now, but in Sketchup there are no TEXT groups created. Only 25 MTEXT and 225 ATEXT groups.
                                      I am testing btw with SketchUp 2022. DXFImport v3.4 is running on SketchUp 2021.
                                      console output of importing "map with Isocontours TEXT.dxf":
                                      Making 74 TEXT Entities...
                                      74 : 0
                                      Making 25 MTEXT Entities...
                                      25 : 0
                                      Making 436 ATTRIBUTE TEXT Entities...
                                      225 : 211

                                      Rotation testing (dxf issues with special chars.dxf):
                                      Here the 3DText objects that were far off in the lat version, are now closer again, but still not fully correct:
                                      It seems the attachment point for rotation is not read correctly:

                                      In below screen shots, black is the unrotated text from v3.4, green is where it should be according to the DXF definition, red is where the import is placed.
                                      Looks like all are attachment point issues, except the "Masse am Bau:" which is shifted down since version 3.4.


                                      DXF v4.2 rotation issue 1 SNQ4.png


                                      DXF v4.2 rotation issue 2 SNQ4.png


                                      DXF v4.2 AttachmentPoint issue 3 Masse am Bau.png


                                      DXF v4.2 rotation issue 4 Dim text.png


                                      DXF v4.2 rotation issue 5 Dim text.png

                                      1 Reply Last reply Reply Quote 0
                                      • TIGT Offline
                                        TIG Moderator
                                        last edited by

                                        The TEXT is NOT imported for me.
                                        Says 74 made, 0 failed.
                                        But in the Outliner there's nothing ! a mystery...
                                        Investigating...

                                        TIG

                                        1 Reply Last reply Reply Quote 0
                                        • TIGT Offline
                                          TIG Moderator
                                          last edited by

                                          I got to the bottom of this !
                                          It did process all of the TEXT but then it wasn't adding the 3d-text geometry !!
                                          Another stupid temp-typo...
                                          Now it's fixed...
                                          Here's v4.3
                                          https://sketchucation.com/pluginstore?pln=importDXFtext

                                          I'll look at the rotation reports next...

                                          TIG

                                          1 Reply Last reply Reply Quote 0
                                          • uwesketchU Offline
                                            uwesketch
                                            last edited by

                                            @tig said:

                                            I got to the bottom of this !
                                            It did process all of the TEXT but then it wasn't adding the 3d-text geometry !!
                                            Now it's fixed...

                                            I tested v4.3 re TEXT: IT IS BACK πŸ˜„ Great!
                                            And the position and rotation of TEXT is very precise.
                                            Funny, that two TEXTs ("Sunnenberg" and "Rinderweidweg") are slightly off (only by a 1/4 of the font height).
                                            In below screen shots, green are TEXTs that are precisely positioned, red marked the two longer TEXTs that are a bit shifted. I think it can be ignored, but still wanted to let you know.


                                            DXF v4.3 TEXT position issue 1 Sunnenberg.png


                                            DXF v4.3 TEXT position issue 2 Rinderweidweg.png

                                            1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 3
                                            • 4
                                            • 5
                                            • 6
                                            • 7
                                            • 8
                                            • 9
                                            • 6 / 9
                                            • First post
                                              Last post
                                            Buy SketchPlus
                                            Buy SUbD
                                            Buy WrapR
                                            Buy eBook
                                            Buy Modelur
                                            Buy Vertex Tools
                                            Buy SketchCuisine
                                            Buy FormFonts

                                            Advertisement