@ezyuzin Any reasons why?
Best posts made by Dan Rathbun
-
RE: AI-Created Extension for SketchUp – Issues with CTRL Modifier Functionality
@robertWan said in AI-Created Extension for SketchUp – Issues with CTRL Modifier Functionality:
Using
Sketchup::InputModifier::CTRL
to check if the CTRL key is pressed.Where did you get
Sketchup::InputModifier::CTRL
from? This is NOT a constant defined by SketchUp's Ruby API. Nor is there anInputModifier
submodule. Be careful as the AIs have been known to just "invent" coding objects or functions to satisfy themselves in providing "solutions" (which are not guaranteed to work.)FYI, the toplevel constants defined by SketchUp's Ruby API are listed at:
Top Level Namespace
In the tool's
onLButtonDown
callback method, I think you should be usingCOPY_MODIFIER_KEY
orCOPY_MODIFIER_MASK
instead ofMK_CONTROL
to test theflags
passed in by the SketchUp engine. See the Sketchup::Tool abstract class overview.
Also, your extension submodule should be wrapped within a unique top-level namespace module. Ie:
module RobertWan # top-level namespace module CustomSelectionTool # extension submodule class SelectPlaneTool # ... the tool code ... end def self.activate_select_plane_tool Sketchup.active_model.select_tool(SelectPlaneTool.new) end if !file_loaded?(__FILE__) UI.menu('Plugins').add_item('Select Plane Tool') { CustomSelectionTool.activate_select_plane_tool } file_loaded(__FILE__) end end # extension submodule end # top-level namespace
-
RE: [Plugin] Multiple Component Edit Warning
PLUGIN UPDATE
@paulofukuta said in [Plugin] Multiple Component Edit Warning:
When I install the Edit Flag v2.4.0 plugin in SketchUp in Brazilian Portuguese, the tool name does not appear. How could I fix this bug?
There were unicode character bugs in some of the language files resulting in silent failures for the menu command labels.
I fixed all the bugs in the language files with version 2.4.2 (see below).
@elijahpekaar said in [Plugin] Multiple Component Edit Warning:
@ashscott Is there a possibility of getting an updated version for 2024 sketchup?
I am the author of Ash's extension. (He hasn't been here in almost 2 years and not posted in the forum for almost 7 years.)
Changes for SketchUp 2024 and Ruby 3:
v 2.4.2 : 2024-04-27 by Dan Rathbun
-
Updates specific to SketchUp 2024+ and Ruby 3.2:
- Changed File.exists? call to File.exist? -
Re-focus the Sketchup window, so that the Edit Flag warning dialog no longer seizes the focus from the main modeling window.
-
Fixed the scrollbars showing in the edit warning dialog.
-
Added system font identifiers for both platforms to the "font-family" style for the dialog. The text should now show in the system font.
-
Localization:
- Fixed unicode characters in files: es, fr, it, pt-BR, pt-PT
- Added language hash files: cs, ko, ja, pl, sv, uk, zh-TW, zh-CN.
- Localized the extension description and name for the Extension Manager. -
The extension is now signed.
-
-
RE: C SDK save in 2022 or 2023 formats
@Dan-Rathbun said in C SDK save in 2022 or 2023 formats:
What is different in the v22 and v23 file formats that need to be maintained?
I took a quick look at the release notes and I see only 2 new features that would be saved into the SKP file data:
v23 : Added Ruby Overlays and the model now has a flag collection with a Boolean state for overlays.
v24 : Added the Ambient Occlusion style properties (a state flag and numeric setting.)
Opening a SKP file on any older version back to 21 would just ignore any unknown data. This is known as SketchUp's versionless format since v21.
So WHY would you need to backsave to what v22 or v23 saved as ?
Ie, v22 did not add any new features that made the SKP any different from what v21 saved.
And, v23 only adds the listing for the overlays collection and would just ignore the new AO style attributes (added in v24) it does not know about. It might leave the attributes as is within the model data but do nothing with them, OR ignore them so as to not write them out when it saves a v23 SKP.
-
RE: C SDK save in 2022 or 2023 formats
I think it is expected that you use
SUModelSaveToFileWithVersion()
with aSUModelVersion_SU2021
constant.What is different in the v22 and v23 file formats that need to be maintained?
The only other thing I can think of is to compile 2 external utilities with old versions of the SketchUp SDK and have these utilities backsave the SKP files using the
SUModelVersion_Current
constant.
Latest posts made by Dan Rathbun
-
RE: [Plugin] Multiple Component Edit Warning
FYI ... Julia Eneroth has released her own edition of this feature that uses the SketchUp 2023 (and later) Overlay feature. So, for those that despise popup windows, you can see the instance path as a text overlay upon the model view instead.
Eneroth Component Breadcrumbs
https://extensions.sketchup.com/extension/880e8e68-2bd1-4451-949b-44d23ce0e2c7/eneroth-component-breadcrumbs -
RE: C SDK save in 2022 or 2023 formats
@Dan-Rathbun said in C SDK save in 2022 or 2023 formats:
What is different in the v22 and v23 file formats that need to be maintained?
I took a quick look at the release notes and I see only 2 new features that would be saved into the SKP file data:
v23 : Added Ruby Overlays and the model now has a flag collection with a Boolean state for overlays.
v24 : Added the Ambient Occlusion style properties (a state flag and numeric setting.)
Opening a SKP file on any older version back to 21 would just ignore any unknown data. This is known as SketchUp's versionless format since v21.
So WHY would you need to backsave to what v22 or v23 saved as ?
Ie, v22 did not add any new features that made the SKP any different from what v21 saved.
And, v23 only adds the listing for the overlays collection and would just ignore the new AO style attributes (added in v24) it does not know about. It might leave the attributes as is within the model data but do nothing with them, OR ignore them so as to not write them out when it saves a v23 SKP.
-
RE: C SDK save in 2022 or 2023 formats
I think it is expected that you use
SUModelSaveToFileWithVersion()
with aSUModelVersion_SU2021
constant.What is different in the v22 and v23 file formats that need to be maintained?
The only other thing I can think of is to compile 2 external utilities with old versions of the SketchUp SDK and have these utilities backsave the SKP files using the
SUModelVersion_Current
constant. -
RE: AI-Created Extension for SketchUp – Issues with CTRL Modifier Functionality
If it does not work using
onLButtonDown
then try renaming the callback toonLButtonUp
. I recall back in the v8 days there were some quirks with one or the other callback method (I think on Mac platform mostly.) -
RE: AI-Created Extension for SketchUp – Issues with CTRL Modifier Functionality
@robertWan said in AI-Created Extension for SketchUp – Issues with CTRL Modifier Functionality:
Using
Sketchup::InputModifier::CTRL
to check if the CTRL key is pressed.Where did you get
Sketchup::InputModifier::CTRL
from? This is NOT a constant defined by SketchUp's Ruby API. Nor is there anInputModifier
submodule. Be careful as the AIs have been known to just "invent" coding objects or functions to satisfy themselves in providing "solutions" (which are not guaranteed to work.)FYI, the toplevel constants defined by SketchUp's Ruby API are listed at:
Top Level Namespace
In the tool's
onLButtonDown
callback method, I think you should be usingCOPY_MODIFIER_KEY
orCOPY_MODIFIER_MASK
instead ofMK_CONTROL
to test theflags
passed in by the SketchUp engine. See the Sketchup::Tool abstract class overview.
Also, your extension submodule should be wrapped within a unique top-level namespace module. Ie:
module RobertWan # top-level namespace module CustomSelectionTool # extension submodule class SelectPlaneTool # ... the tool code ... end def self.activate_select_plane_tool Sketchup.active_model.select_tool(SelectPlaneTool.new) end if !file_loaded?(__FILE__) UI.menu('Plugins').add_item('Select Plane Tool') { CustomSelectionTool.activate_select_plane_tool } file_loaded(__FILE__) end end # extension submodule end # top-level namespace
-
RE: NEW Forum Software Issues
Image sizes
I did search this category but got no hits.
Discourse forums allow setting a size for images via the addition of a pipe character and size following the image filename within the square brackets, viz:
![cascader_toolbar.png|32x32](/assets/uploads/files/1718236046527-cascader_toolbar.png)
But specifying size this way is not honored by SCF's forum software.
Is there some other way?
@Gábor ?
-
RE: Parametric Modeling - development?
@Jorgensen said in Parametric Modeling - development?:
I've been jealous of the users of Rhino for some years - that they have the node based tool - grasshopper.
I think node based modeling could be a big think for Sketchup, but it seems development stopped back in 2021, witch I find sad....
Sorry, Cannot help with contact.
But SketchUp Live Components and the Trimble Creator have not been abandoned AFAIK.
Discussion is still happening in its SketchUp Labs subcatgeory.
-
[Plugin] Dialog Cascader - recover and collect Ruby dialogs
[Extension] Dialog Cascader for Ruby extension dialogs
v 1.0.0
Purpose: Brings together extension dialogs scattered on multiple screens or possibly lost offscreen. May be a benefit to users with notebook docks or who move their machine between locations with differing display setups.
Will not work on native web-based dialogs such as 3D Warehouse, Extension Manager, etc. (These windows are hidden from the API.)
NOTE: SketchUp 2024
hasmay have had some fixes that can natively detect lost dialogs and move them back onto an active display. This extension is meant for older versions that do not have this fix or possibly as a complement for when the native fix might fail.- ADD: It has been said that the lost dialog windows are still happening with SU2024.
Localization: localized for SketchUp supported languages (and nl & uk.)
Adds a menu item to the Window menu.
Provides a toolbar with a button:
- single-click: cascades any open Ruby dialogs
- double-click: shows About dialog
Tested on MS Windows platform. Version 2024, 2023, 2022, 2021, & 2017.
I tried to write this so it might possibly even load under Ruby 1.8 for versions prior to SU2014.
But no guarantees for such old versions. (I do not have a machine ready that can run these old versions and I'm not really interested in trying to test for them.) -
RE: [Plugin] Multiple Component Edit Warning
PLUGIN UPDATE
@paulofukuta said in [Plugin] Multiple Component Edit Warning:
When I install the Edit Flag v2.4.0 plugin in SketchUp in Brazilian Portuguese, the tool name does not appear. How could I fix this bug?
There were unicode character bugs in some of the language files resulting in silent failures for the menu command labels.
I fixed all the bugs in the language files with version 2.4.2 (see below).
@elijahpekaar said in [Plugin] Multiple Component Edit Warning:
@ashscott Is there a possibility of getting an updated version for 2024 sketchup?
I am the author of Ash's extension. (He hasn't been here in almost 2 years and not posted in the forum for almost 7 years.)
Changes for SketchUp 2024 and Ruby 3:
v 2.4.2 : 2024-04-27 by Dan Rathbun
-
Updates specific to SketchUp 2024+ and Ruby 3.2:
- Changed File.exists? call to File.exist? -
Re-focus the Sketchup window, so that the Edit Flag warning dialog no longer seizes the focus from the main modeling window.
-
Fixed the scrollbars showing in the edit warning dialog.
-
Added system font identifiers for both platforms to the "font-family" style for the dialog. The text should now show in the system font.
-
Localization:
- Fixed unicode characters in files: es, fr, it, pt-BR, pt-PT
- Added language hash files: cs, ko, ja, pl, sv, uk, zh-TW, zh-CN.
- Localized the extension description and name for the Extension Manager. -
The extension is now signed.
-