@jim said:
What functions do you need from AMS_Lib? I think this can be done without any Windows-specific functions.
The plugin need AMS_LIB to find window which opened the component,then active it.
@jim said:
What functions do you need from AMS_Lib? I think this can be done without any Windows-specific functions.
The plugin need AMS_LIB to find window which opened the component,then active it.
@rich o brien said:
you should be able to update your plugins/extensions at plugins.sketchucation.com
here you can push updates directly to the store
I can't login http://plugins.sketchucation.com/.
Should I use password same as http://www.sktchucation.com?
@sadyo said:
Wondering if we can edit multiple component with your plugin
Yes,will open multiple sketchup window for each component.
@jql said:
@wikii said:
with SEC v0.02
If I make shortcuts CAS+E to "Edit Component",CAS+B to "Send Back".
In a Sketchup window, I select a component,then press CAS+E to "Edit Component" .the component will be saved and opened in a new su window .
Edit something in the new su window, then press CAS+B to "Send Back",the file will been saved . then old sketchup window will be actived and reload the component automaticly.
I think this plugin can greatly improve the modeling efficiency.
This was a though read but it's an excellent feature.
What if you had a "save as and edit" tool.
Using this feature on a component wich has not been "saved as" manually before, would first save as and then open the component in a new window.
If a component had been saved before, it would simply open it.
Also.
What about conflicts?
Could there be a way to lock a component that is being edited? And reload it as usual even locked once the edition is finished and unlock it only when the editing window has been closed?
yeah,to lock the component when it has been opened in the new window is necessarily.
@bob james said:
@wikii said:
with SEC v0.02
If I make shortcuts CAS+E to "Edit Component",CAS+B to "Send Back".
What is "CAS" in CAS+E and CAS+B
cas+e means shortcut : ctrl+alt+shift+e.
with SEC v0.02
If I make shortcuts CAS+E to "Edit Component",CAS+B to "Send Back".
In a Sketchup window, I select a component,then press CAS+E to "Edit Component" .the component will be saved and opened in a new su window .
Edit something in the new su window, then press CAS+B to "Send Back",the file will been saved . then old sketchup window will be actived and reload the component automaticly.
I think this plugin can greatly improve the modeling efficiency.
@driven said:
it also requires "whdialog.rb"?
but that's not in the AMS_LIB from the Plugin Store...
john
whdialog is a lib that I wrote to creat webdialog easily.
with out whdialog this plugin can also run well.
@guanjin said:
Wikii,Elder brother
AMS_LIB,Where to download
you can download ams_lib here
http://sketchucation.com/forums/viewtopic.php?f=323%26amp;t=55067
Hi Anton_S
Thank you for you reply!
If I want send a message from Sketchup window A to Sketchup window B, I can use AMS::Window.send_message.
But ,how can Sketchup window B get to know there is a message come from window A?
I think , Window B must have an observer to get message when message come.
I want to konw , can window B respond message sent from A immediately?
Thank you for you great lib!
wikii
AMS::Window.send_message can sent something to a sketchup window, but,how to get message in sketchup by ruby?
thank you.
@greatoe said:
Does this work for Mac?
I got error loading this on a Mac.
Sorry this plugin need ams_lib to find sketchup window.
ams_lib only works on pc.
@jql said:
@wikii said:
sharp editor of componet v0.01
1 select a component
2 right click it
3 from pop menu ,select "Edit Component"
4 the component will be open in a new sketchup window(if already opened,the window will be actived).
5 modify the model in the new open window,then save it.
6 back to the first sketchup window
7 right click the component,then "reload component"This plugin need AMS_LIB.
[attachment=1:2cnkdyrm]<!-- ia1 -->sharp2.gif<!-- ia1 -->[/attachment:2cnkdyrm]
[attachment=0:2cnkdyrm]<!-- ia0 -->Sharp_edit_comp.rb<!-- ia0 -->[/attachment:2cnkdyrm]Excellent!
What if the component has already been "save as" into a folder. Does it open the component inside that folder?
If the component has been saveas or loaded from skp file , the sharp editor of component will open the skp file directly.
sharp editor of componet v0.01
1 select a component
2 right click it
3 from pop menu ,select "Edit Component"
4 the component will be open in a new sketchup window(if already opened,the window will be actived).
5 modify the model in the new open window,then save it.
6 back to the first sketchup window
7 right click the component,then "reload component"
This plugin need AMS_LIB.
v0.02
add sendback , auto active old su window and auto reload componet.
v1.0 1129
1 lock component instances when definition opened in the seperate su window.
2 unlock component instances when the seperate su window close.
3 rewrite codes to work more clearly.
need ams_lib 3.1.0
@jim said:
Hi wikii - this topic may be of interest:
http://sketchucation.com/forums/viewtopic.php?f=180%26amp;t=60568
Thank you for your suggestion, Jim.
Save a component as one skp file .
path="c;\\my_Component.skp"
my_definition = Sketchup.active_model.selection[0].definition
my_definition.save_as path
Open the skp file , edit it,and save .
Now,how to reload the skp file to refresh the component definition with ruby?
model = Sketchup.active_model
definitions = model.definitions
definitions.load "c;\\my_Component.skp"
the code does not work.I think definitions.load can load a new skp file other than a loaded skp file.
Anyway to do it?
Waiting.
wikii
@anton_s said:
Hi Wikii. I added the post-events.
You should try out this example in Ruby console:
class MySUWindowObserver
> def swo_on_maximize
> puts 'swo_on_maximize'
> p AMS;;Sketchup.get_viewport_rect()
> end
>
> def swo_on_post_maximize
> puts 'swo_on_post_maximize'
> p AMS;;Sketchup.get_viewport_rect()
> end
>
> end # class MySUWindowObserver
>
> my_obs = MySUWindowObserver.new
> AMS;;Sketchup.add_observer(my_obs)
AMS Library 3 ChangeLog: http://www.rubydoc.info/github/AntonSynytsia/AMS-Library/master/file/CHANGELOG.md
Hi Anton_S !
It works well in my pc.
It is really cool!
Thank you for your working.
But I have one question more:
When I use win+left or win+right to fill Sketchup to half the size of the screen, which observer call catch this operation?
Thank you!
wikii
@anton_s said:
Description
AMS Library is a collection of tools and functions used to interact with SketchUp window and its sub-windows using Microsoft Windows API. It's capable to switch SketchUp full screen, show/hide toolbar containers, status bar, scenes bar, and more elements of the window. It's also capable to observe and make decisions to various events of the window procedure. In many ways, this library is written to achieve things that cannot be done with standard SketchUp API.
This library includes Ruby FFI and and Win32 API extensions as part of the utility. Both of these gems are recompiled under my own name-space for compatibility with other extensions. I do not take ownership of such gems, nor I claim any credit for them. I just happen to rely on them so much that it was essential to include them in the library.
Requirements
- Microsoft Windows XP, Vista, 7, or 8
- SketchUp 6 or later
UsageDownload
- Available at PluginStore
- ams_Lib_2.2.0.zip
Extract content into the Plugins folder!
It is a great lib!
one question:
when i use swo_on_maximize ,like this
class MySketchupObserver
def swo_on_maximize
r=AMS::C.get_viewport_rect()
p r
end
end
AMS::Sketchup.add_observer($o=MySketchupObserver.new)
I found get_viewport_rect returns the value of viewport before maximized.
So, can you provide a method like swo_on_maximized, will be called when maximize complete?
thank you for the great lib!
wikii
@thomthom said:
@wikii said:
In Sketchup English version , "Plugins" menu name is just "Plugins".
But in Sketchup Chinese version, "Plugins" menu name always change.
How to get the name of Plugins menu in ruby?
Thanks!wikii
The "Plugins" menu was renamed to "Extensions" in SU2015.
Has the Chinese version of SketchUp changed on other versions than SU2015?What are you trying to do?
UI.menu("Plugins")
should always work regardless of version and language.
I have writen a ruby to shortcuts ,so I need the exact name of plugins menu.
Thank you!
Do you mean that I need to make a translation book?
but when a new version Sketchup released, I must update it.
Has a thorough solution?
In Sketchup English version , "Plugins" menu name is just "Plugins".
But in Sketchup Chinese version, "Plugins" menu name always change.
How to get the name of Plugins menu in ruby?
Thanks!
wikii