sketchucation logo sketchucation
    • Login
    1. Home
    2. uwesketch
    3. Posts
    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!
    πŸ«› Lightbeans Update | Metallic and Roughness auto-applied in SketchUp 2025+ Download
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 4
    • Posts 86
    • Groups 1

    Posts

    Recent Best Controversial
    • RE: [Plugin] TT_LibΒ²

      As I had the ruby console open at startup of sketchup, I saw the following warning message during initialization of TT lib latest version 2.12.3:

      C;/Users/xxx/AppData/Roaming/SketchUp/SketchUp 2022/SketchUp/Plugins/TT_Lib2/win32.rb;12; [b]warning; Win32API is deprecated after Ruby 1.9.1; use fiddle directly instead[/b]
      

      Probably unimportant, but just wanted to mention.

      posted in Plugins
      uwesketchU
      uwesketch
    • RE: [Plugin] importDXFtext

      Thanks a lot.

      After installing the Plugin, the version text still says 3.4, so I first thought the install did not work. But all fine.

      Yes, I have more dxf files. What should they ideally contain?

      • 'Orange': Leading space: confirm it works

      • 'blue': works for the minus sign.
        Tested as well with other chars like: Β°"*='^`
        But these are still placed down at the bottom.

      • 'green': works nicely

      • 'brown': Superscripts. I see no difference yet.

      The MText contains for instance the following value string in the dxf:

      \A1;{\fArial|b0|i0|c0|p34;2.88\fArial|b0|i0|c0|p34;\A1{\H.66x;\S5^  ;}}
      

      The imported result of this is:

      2.88\A15
      

      I think correctly interpreted is the follwoing part:
      \A1;{\fArial|b0|i0|c0|p34;2.88\fArial|b0|i0|c0|p34;.....}

      But the part \A1{\H.66x;\S5^ ;} is generating the string \A15
      I think that the dxf code \H.66x;\S....^ means: by a factor 0.66 of font height shift the string starting after /S upwards (^)

      • 'components': I would prefer if the 3D-text is created as a component, not a group. The description (not the name) of the component could then contain the text used in the 3D-text. If someone wants to recreate the 3DText manually, only the description has to be copy/pasted into a new 3DText.
        If the text would also be used as the instance name, The text would be easily recognizable as well in the outliner. But this is just an option.
        The component name (definition) can stay as it is now.

      • 'Rotated MText': would it be easier, if only a rotation around the z-axis would be considered? I think the rotation angle and the position of the "attach" or "center" point is an attribute in the dxf of the MText.
        For me this would be enough, as I import dxf text only for 2D drawings.

      • 'Purple': Line breaks.
        I am not sure, but I thought in dxf there is kind of a column width defined for the MText Codes. Could this be used to estimate the number of characters that fit into the width? For instance assuming an average character in a text is half as wide as high.
        Example: if the width of the box is 1500mm and the font height is 250mm, then we can place around 12 chars into the box before doing a line break.
        Forget the MTEXTBEGIN and MTEXTEND, I thought this defines the width of the mtext box.

      • 'Dimensions':
        I agree it is not trivial. I was thinking about a pragmatic implementation like:

      • get the type of dimension as linear or radial. If the dxf contains a type we cannot map in SketchUp, then ignore it and just import the text as is done today.

      • get the insertion/definition points. But do not try to attach the dimension to an entity.
        For a radial dimension, just create a small circle (for type diameter) or arc (for type radius) at the definition point and attach it to the SketchUp radial dimension. Once the dimension is created, delete the circle/arc.

      • get the text to be used. (do not let Sketchup set the text)

      • try to figure out the arrow style (none, point, open arrow, closed arrow, dash). If nothing matching is found in the dxf, just use the default arrow style from SketchUp.

      • get the distance of the dimension line (linear) or text (radial) from the definition point(s). I would start with only dimensions in the XY plane. (2D).
        (I will try to find out how these dimensions can be drwan using ruby in the general case. In the SketchUp UI I think it is limited to 6 variants: either the dimension measures the X, Y, Z coordinate or the length of the projection on the XY, XZ or YZ plane)

      posted in Plugins
      uwesketchU
      uwesketch
    • RE: [Plugin] importDXFtext

      I have now compared a few files we receive regularly and a lot of the imported text looks fine.
      I have compiled below a list of differences and have created a dxf showing these, so that you can readily reproduce the cases. (The dxf file is attached at the end.)

      The color indications below give the link to the pictures.
      The post is a bit lengthy. But for some points I think it took me more time to document than it will take to implement the change in the plugin πŸ˜‰
      Btw, the print screens were done in Trimble connect where I uploaded the dxf file and the skp file with the imported text.

      Let me know what you think.

      • Currently the 3D-text are all groups. Could instead components be created? Then put the text into the instance name and description (in case too long). Like this we can see the original text in the outliner and component list

      Import Issue 3D-text component vs group outliner.png
      Import Issue 3D-text component vs group ElementInfo.png

      • (Orange marked) it seems that a leading space is not respected. For instance for mΒ², the dxf contains " m".
        If I create a 3D-text for " m" manually in SketchUp, this is converted into 3D-text component for "m", but the origin of the component is positioned to the left of the bounding box.
        So creating SketchUp 3D-texts as components should solve the issue, if the origin is used to place the 3D text at the position as defined in the dxf.

      • (blue marked) a minus sign (dash) as a value of a block Attribute definition is placed too low compared to the text beside it.
        See DUMMY_561, which contains a value being a dash "-".
        The issue here is, that SketchUp creates a boundingbox around the minus sign and the origin of the created component is on the lower left corner minus sign.
        So the minus sign is placed too low.
        Possible solution: always add an M at the end or beginning (when aligned right) of the string for 3D-text.
        Then shift the origin of the 3d-Text component along the Y-axis to the lower left corner of the M. Then delete the M from the generated 3D text.

      • (green marked) some 3D-Texts are positioned a bit too high.
        Reason is, that they contain a p, y, j or g and then the lower end of 3D-text bounding box is not on the writing base line.
        Currently the lowest point of the letter is positioned on the writing base line of normal text - meaning too high.
        This could be corrected by shifting the 3D-text box a bit down. Or if 3D-text components are created, then shift the origin a bit up.

      Result after import
      Result as defined in DXF

      • (brown marked) dxf superscript and subscript commands are not recognized.
        Superscripts are used in architetural drawings to indicate the mm number.
        "20 superscript 5" means 20.5cm, "2.92 superscript 5" means 2.925m
        Does UTF-8 have codes for superscripts which can be used? For example U+2075 (8309) is the unicode number for superscript 5.
        See https://en.wikipedia.org/wiki/Unicode_subscripts_and_superscripts
        Alternatively a separate 3D-text could be created for the superscript signs like:
        Make the superscript or subscript number half the height of the normal text and shift by half a font height up or down. Like this it does not get above or below normal text.

      superscript as shown after import
      Result as defined in DXF

      • (purple marked)** add a line break in the 3D Text** so it gets not wider than indicated in the dxf file. Use the MTEXTBEGIN and MTEXTEND definition of the dxf? (assuming this defines the width of the MText box.
        text not wraped after import
        Result as defined in DXF

      2nd example: (I think this is a bit tricky to implement):
      no text wrapped
      Result as defined in DXF

      • (grey marked) create SketchUp dimensions from DXF dimensions.
        Use only the begin and end point and the position of the line from the dxf.
        For the arrow head, just try to figure it out from the dxf and use the Sketchup model default, if in the dxf we cannot find the three possibilities given in SketchUp.
        For texts with a line to a point like heights, create a dimension where the line is not offset from the starting point and choose text position "start outside" and no arrow head or a dot.
        Or create a radius dimension and type in the text and choose an arrow or point as arrow head.
        Set the dimension text in SketchUp to what the MText in dxf indicates.

      only MText is imported from dimensions
      Result as defined in DXF

      • (red marked) MText rotated: currently MText that is rotated is not rotated during import. Can this be done?
        Currently dimension texts are also always imported as horizontal as they are MTEXTs. Could one rotate the dimension text to be along the dimension lines?
        However, if dimensions are imported as such in SketchUp, then this is not important anymore.

        Btw, text that comes from a block attribute is rotated correctly already.

      MText imported only horizontally
      Result as defined in DXF


      DXF file with text import issue examples

      posted in Plugins
      uwesketchU
      uwesketch
    • RE: [Plugin] importDXFtext

      @tig said:

      Let me know... I can only say 'no'...

      Will do. Indeed πŸ˜„

      posted in Plugins
      uwesketchU
      uwesketch
    • RE: [Plugin] importDXFtext

      @tig said:

      Thanks for the testing and reports.
      I've added a 'fall-back' case to the code if the DXF is no formed to ACAD's normal standards, so the PluginStore's version now has that...

      thanks, will download and install and run.

      posted in Plugins
      uwesketchU
      uwesketch
    • RE: [Plugin] importDXFtext

      Hi TIG

      now that the import is flowing through nicely, I looked at the import result a bit closer.
      I found a few minor issues, which would be nice, if they could be resolved.
      However, as it takes a bit of time to create a case so you can easily reproduce it, I wanted to ask beforehand, if you will have time and interest to look into it.

      posted in Plugins
      uwesketchU
      uwesketch
    • RE: [Plugin] importDXFtext

      After the INSUNITS without the $ in front, there is (it is almost at the end of the file (200 lines before EOF)):
      INSUNITS
      350
      4CE6
      3
      LAYOUTDICT
      350
      4CE3
      3
      LWETCUNION
      350
      4CE5
      3
      PLOTSETDICT
      350
      4CE4
      3
      PSVPSCALE
      350
      4CEB
      3
      PUCSBASE
      ....

      with the previous version the behaviour was:
      If I import the "no unit" file a second time, then the default unit is simply the one with which I imported the file before. Meaning the default unit is not initialized each time a file is chosen.

      now with the last version, it seems that the "no unit" file defaults to unit Inches.
      If I import the file with meters, the warning says the default is inches and the import runs.
      If I then import the same file again, the default unit correctly displays again inches and not meter, like before.

      Nice, thanks a lot.

      posted in Plugins
      uwesketchU
      uwesketch
    • RE: [Plugin] importDXFtext

      @tig said:

      Here's v3.4 again
      I think I've fixed the array issues ???

      Now it does not crash anymore when loading the file and I get:
      The list of units is set to mm as a default:
      ImportDXFText Unitlist.png

      when pressing ok, I get this warning:
      ImportDXFText warning.png

      When changing the units to something different than mm, I get:
      ImportDXFText warning 2.png

      Seems like the units found in the DXF file are "empty": []

      With another file lke the block.dxf, I get as the default unit [inches]

      posted in Plugins
      uwesketchU
      uwesketch
    • RE: [Plugin] importDXFtext

      yes, installed via extension manager and restarted SketchUp.

      For the file block.dxf, which shows inch, but in fact should be meter, the entries are:
      $MEASUREMENT
      70
      0
      9
      ...
      $INSUNITS
      70
      1
      9

      for the dxf which causes a crash if loaded as the first file after opening SketchUp, I find:
      $MEASUREMENT
      70
      0
      0
      ...
      But there is NO $INSUNITS in this file!

      What I find is a code without the $ sign:
      INSUNITS
      350
      4CE6
      3

      In a third file, which also works, I have:
      $MEASUREMENT
      70
      0
      9
      ...
      $INSUNITS
      70
      6
      9

      all files have as well Codes called $LUNITS and $AUNITS
      $LUNITS
      70
      2
      9
      ...
      $AUNITS
      70
      0
      9

      Hope this helps finding the cause for error message.

      posted in Plugins
      uwesketchU
      uwesketch
    • RE: [Plugin] importDXFtext

      Thanks a lot.
      Still the same at the beginning.
      Can it be, that the units list returned from the DXF is empty in certain cases?
      After I tried with another dxf it worked. And from then on, the first dxf file also worked.

      Seems to me as if the array is not always initialized.

      Other point: I have another dxf which the plugin now identifies being "inch". But this is not the correct unit. It must be meter. Are there multiple units in the file where you can look which unit is the right?

      Error: #<TypeError: wrong argument type nil (expected Array)>
      C:/Program Files/SketchUp/SketchUp 2021/Tools/sketchup.rb:121:in inputbox' C:/Program Files/SketchUp/SketchUp 2021/Tools/sketchup.rb:121:in inputbox'
      C:/Users/Birgit/AppData/Roaming/SketchUp/SketchUp 2021/SketchUp/Plugins/importDXFtext/importDXFtext_code.rb:99:in get_units' C:/Users/Birgit/AppData/Roaming/SketchUp/SketchUp 2021/SketchUp/Plugins/importDXFtext/importDXFtext_code.rb:1880:in new'
      C:/Users/Birgit/AppData/Roaming/SketchUp/SketchUp 2021/SketchUp/Plugins/importDXFtext/importDXFtext_code.rb:1894:in `block in module:ImportDXFtext'

      posted in Plugins
      uwesketchU
      uwesketch
    • RE: [Plugin] importDXFtext

      Thanks.
      Tested version 3.4, with the same dxf file as before: unfortunately 😞

      I do not even get the unit dialog:
      Error: #<TypeError: wrong argument type nil (expected Array)>
      C:/Program Files/SketchUp/SketchUp 2022/Tools/sketchup.rb:121:**in inputbox'** C:/Program Files/SketchUp/SketchUp 2022/Tools/sketchup.rb:121:in inputbox'
      C:/Users/Birgit/AppData/Roaming/SketchUp/SketchUp 2022/SketchUp/Plugins/importDXFtext/importDXFtext_code.rb:99:in get_units' C:/Users/Birgit/AppData/Roaming/SketchUp/SketchUp 2022/SketchUp/Plugins/importDXFtext/importDXFtext_code.rb:1880:in new'
      C:/Users/Birgit/AppData/Roaming/SketchUp/SketchUp 2022/SketchUp/Plugins/importDXFtext/importDXFtext_code.rb:1894:in `block in module:ImportDXFtext'

      posted in Plugins
      uwesketchU
      uwesketch
    • RE: [Plugin] importDXFtext

      I checked again with version 3.2 (where I fixed the variable error by setting "cp = gents.add?...")
      using units = meters: All works as expected. The MTexts, Texts and ATexts are all at the correct position and size in SketchUp.

      As soon as I import with "unites = mm" (which I think is not correct for this drawing), SketchUp crashes. So nothing new.

      Somehow I think the Plugin works fine, just that it causes a crash, if units are choosen too small (user error).

      Could we not define, that objects are not imported, if the resulting 3D text height is below a limit?
      (I assume it is the too small 3D text size which brings Sketchup 2021 and 2022 to a crash)

      In the console or a dialog box, the number of skipped texts could be reported at the end of the import process.

      I created in SketchUp a 3D text using the standard menu option:
      The height of a 3D Text must be equal or bigger than 0.0254 mm(1/1000 inch). If you enter a smaller value, SketchUp gives an error message, saying the length entered is too small. (Probably Sketchup Team had these crashes as well and now there is a data entry validation)

      0.0254mm is the smallest height to create a 3D Text

      posted in Plugins
      uwesketchU
      uwesketch
    • RE: [Plugin] importDXFtext

      Ok, Clear, makes sense.

      I tested and it turns out, that AText is by a factor of 39 too small (100/2.54).
      So if I have a MText or Text at position (x,y,z) = (100mm, 100mm, 0mm) then the MText is imported into SketchUp at the right position, but the AText being at the same position in DXF, ends up in SketchUp at (2.54mm,2.54mm,0mm).
      Also the height of the Text is much smaller.

      I imported indicating units = meter.

      Probably this is the reason why if choosing MilliMeter for import, it crashes, because a few mm divided by 39 is giving a too small text size.

      posted in Plugins
      uwesketchU
      uwesketch
    • RE: [Plugin] importDXFtext

      out of curiosity, not saying it is wrong or I would know why πŸ˜‰
      Yesterday evening, for testing, I did the same change for make_atext as it stands in make_mtext and then it worked.

      For ***make_text ***and make_mtext you assigned the variable cp:

            if string.tr(' ','').gsub(/\\P/,'')==""
              string=""
             ***cp = gents.add_cpoint(ORIGIN)***
              puts "Empty String = Cpoint"
              next
              #height=100.mm
            end#if
            ###
            bold=false;italic=false
            ###
            begin
              ###
              gents.add_3d_text(string,align,font,bold,italic,height,0.0,0.0,true,thick) if string && string !=""
            rescue Exception => ex
              puts ex
            ensure ### ?
            end
            next unless gp.valid?
            ***cp.erase! if cp && cp.valid?*** # we don't need a cpt inside text??
      

      But for make_atext, you commented out the line causing errors:

            if string.tr(' ','').gsub(/\\P/,'')==""
              string=""
              ***gents.add_cpoint(ORIGIN)***
              puts "Empty String = Cpoint"
              next
            end#if
            string=string.strip.gsub(/\\P/,"\n")### replace \P with \n
            ###
            bold=false;italic=false
            ###
            begin
              gents.add_3d_text(string,align,font,bold,italic,height,0.0,0.0,true,thick) if string && string !=""
            rescue Exception => ex
              puts ex
            ensure ### ?
            end
            next unless gp.valid?
           ***#cp.erase! if cp && cp.valid?*** # we don't need a cpt inside text??
      
      posted in Plugins
      uwesketchU
      uwesketch
    • RE: [Plugin] importDXFtext

      Hi TIG

      SketchUUp Ext. manger showed 3.2 after install. But I did not see the
      line with**cp =**gents.add... in the code file.

      Agree, the fix is to be applied about 10 lines further up than what is reported in the console.

      I think I also had crashes in Sketchup when working with mm.
      Cool, you could find a work around!

      Downloaded and installed version 3.3. So far all good.
      Will test later today and let you know.

      posted in Plugins
      uwesketchU
      uwesketch
    • RE: [Plugin] importDXFtext

      Thanks for the quick reply.
      I just downloaded, installed and tried.
      But I still have the same issue and exact same error message.
      Looks like a new main prog, but same code file.


      Making 0 TEXT Entities...
      Making 0 MTEXT Entities...
      Making 16 ATTRIBUTE TEXT Entities...
      Error: #<NameError: undefined local variable or method cp'** for TIG::ImportDXFtext:Module> C:/Users/Birgit/AppData/Roaming/SketchUp/SketchUp 2022/SketchUp/Plugins/importDXFtext/importDXFtext_code.rb:**1273:in block in make_atext'
      C:/Users/Birgit/AppData/Roaming/SketchUp/SketchUp 2022/SketchUp/Plugins/importDXFtext/importDXFtext_code.rb:1118:in each' C:/Users/Birgit/AppData/Roaming/SketchUp/SketchUp 2022/SketchUp/Plugins/importDXFtext/importDXFtext_code.rb:1118:in each_with_index'
      C:/Users/Birgit/AppData/Roaming/SketchUp/SketchUp 2022/SketchUp/Plugins/importDXFtext/importDXFtext_code.rb:1118:in make_atext' C:/Users/Birgit/AppData/Roaming/SketchUp/SketchUp 2022/SketchUp/Plugins/importDXFtext/importDXFtext_code.rb:1776:in import'
      C:/Users/Birgit/AppData/Roaming/SketchUp/SketchUp 2022/SketchUp/Plugins/importDXFtext/importDXFtext_code.rb:1799:in new' C:/Users/Birgit/AppData/Roaming/SketchUp/SketchUp 2022/SketchUp/Plugins/importDXFtext/importDXFtext_code.rb:1805:in block in module:ImportDXFtext'

      posted in Plugins
      uwesketchU
      uwesketch
    • RE: [Plugin] importDXFtext

      Hi
      I have dxf files with Attribute texts and when importing, then I get an error that the variable cp is not defined.
      I attached a small example in order to easily reproduce the issue.
      Can you fix the error?
      I assume it is the same issue as in Oct 2020 with the Text.

      The ruby console output is:
      ......

      Making 0 TEXT Entities...
      Making 0 MTEXT Entities...
      Making 16 ATTRIBUTE TEXT Entities...
      Error: #<NameError:**undefined local variable or method cp' for TIG::ImportDXFtext:Module**> C:/Users/Birgit/AppData/Roaming/SketchUp/SketchUp 2022/SketchUp/Plugins/importDXFtext/importDXFtext_code.rb:1273:in block in make_atext'
      C:/Users/Birgit/AppData/Roaming/SketchUp/SketchUp 2022/SketchUp/Plugins/importDXFtext/importDXFtext_code.rb:1118:in each' C:/Users/Birgit/AppData/Roaming/SketchUp/SketchUp 2022/SketchUp/Plugins/importDXFtext/importDXFtext_code.rb:1118:in each_with_index'
      C:/Users/Birgit/AppData/Roaming/SketchUp/SketchUp 2022/SketchUp/Plugins/importDXFtext/importDXFtext_code.rb:1118:in make_atext' C:/Users/Birgit/AppData/Roaming/SketchUp/SketchUp 2022/SketchUp/Plugins/importDXFtext/importDXFtext_code.rb:1776:in import'
      C:/Users/Birgit/AppData/Roaming/SketchUp/SketchUp 2022/SketchUp/Plugins/importDXFtext/importDXFtext_code.rb:1799:in new' C:/Users/Birgit/AppData/Roaming/SketchUp/SketchUp 2022/SketchUp/Plugins/importDXFtext/importDXFtext_code.rb:1805:in block in module:ImportDXFtext


      dxf containing only Attribute-Texts

      posted in Plugins
      uwesketchU
      uwesketch
    • RE: [Plugin][$] FredoGhost - v2.1a - 01 Apr 24

      Hi Fredo

      I used the Bounding Box Ghosts in all three modes for a nested component.
      I am using FredoGhost 1.8a on SketchUp 2021 Jan release.

      The original object contains nested components (5 levels). Only the inner most component contains geometry (3 faces). Each components contains 3 sub-components. In total there are 5 components and 120 instances. There are only 81 Faces (3^4) with each 4 edges.

      When generating Bounding Boxes "by grouped object" and "by sub-object", then far too many bounding boxes are created. There are many duplicates (roughly 729 = 3^6).
      See the attached model.

      The mode "by grouped object" created 59094 faces.
      The mode "by sub-object" created 63609 faces.

      Shows duplicated BB objects


      Ghosted with Bounding boxes - too many BB generated

      posted in Plugins
      uwesketchU
      uwesketch
    • RE: [Plugin][$] FredoGhost - v2.1a - 01 Apr 24

      Hi Fredo
      below an example print screen.

      The Sketchup model is attached.
      When unhiding the FredoGhost tag, we see, that the plane is that huge, due to the hidden FredoGhost objects.

      Section Cut Plane without any Fredo Ghost defined:
      Section Cut plane without Fredo Ghosts defined

      Section Cut plane with Fredo Ghost proxy defined:
      SectionCut With FredoGhost Proxy defined


      FredoGhost and Section Cut skp model

      posted in Plugins
      uwesketchU
      uwesketch
    • RE: [Plugin][$] FredoGhost - v2.1a - 01 Apr 24

      Hi Fredo

      The plugin is very useful.
      I want to use it for switching between high and low poly components. However there is one thing that prevents me for using it in many models.
      If I do a section cut, then the section cut plane is huge. This is because of the hidden objects you place far away in the FREOO tag.

      Is there a way to prevent this huge section cut plane?

      posted in Plugins
      uwesketchU
      uwesketch
    • 1
    • 2
    • 3
    • 4
    • 5
    • 3 / 5