Really bad news.
Bad habit to remove features.
Just finished an automated conversion process using autocad and SU in one toolchain to create 3D-content in DWG and SKP format.
So either no upgrading or removing SKP from the offered formats.
Posts
-
RE: Bad News for Architects in the next ver. of Google Sketchup
-
RE: [Code] ComponentInstance-add_entities v1.9
Thanks for the quick fix.
Working correctly again! -
RE: [Code] ComponentInstance-add_entities v1.9
Using 1.7 instead of 1.6 gives me this error:
@unknownuser said:
convert_acad_import
Error: #<NoMethodError: C:/Programme/Google/Google SketchUp 7/Plugins/ComponentInstance-add_entities17.rb:188:inadd_entities': undefined method
each' for nil:NilClass>
C:/Programme/Google/Google SketchUp 7/Plugins/ComponentInstance-add_entities17.rb:188 -
RE: Revit to Sketchup: missing geometry
One thing I observed on my DWG Imports, is that Sketchup does make a diffence between front and backside of 3D-faces.
So are the faces missing or does they look different, because you look on the default-color of a backside?
I had to optimize my 3D-Face-Blocks in autocad to look good in SU.
Not sure if a revit-export write a proper face-orieatation to the DWG format. -
RE: [Code] ComponentInstance-add_entities v1.9
@thomthom said:
Maybe things aren't ready immediately when SU loads the plugins...
Have you tried using a timer to delay the execution of your script instead of having to send keystrokes`?I tried a 'sleep' with some diferent values without any success.
@tig said:
require 'toggleWindows.rb' ?
I had it yet for closing the outliner.
With my workaround it is working fine now.
(Automated DWG-Creation and SKP-Conversion(Acad-Blocks to SU-DC with non-editable prop) in a Batch process.) -
RE: [Code] ComponentInstance-add_entities v1.9
Cannot be true, because the error come from inside the add_entities-code.
Otherwise the error would tell about unknown method. -
RE: Exit/Shutdown SU 7 ??
I revert back to the:
wsh.SendKeys('%{F4}')
because:
Sketchup.send_action 57602
immidiatly shut down SU even when the save-process is not finished.
So its get not saved. -
RE: Exit/Shutdown SU 7 ??
Another point to use one of the other methods.
For now I will go for the Sketchup.send_action which seems to be the best/smallest option. -
RE: [Code] ComponentInstance-add_entities v1.9
@thomthom said:
Are you sure you have an instance of that definition in your model?
Yes, because when I outcomment my call and type it in the console after start-complete it works.
Therefor I build just a workaround:
wsh = WIN32OLE.new('Wscript.Shell') if wsh.AppActivate(skpbasename+".skp - SketchUp") sleep(1) wsh.SendKeys('{F2}') sleep(1) wsh.SendKeys('convert_acad_import{ENTER}') end
Seems that ruby's on startup have problems to use other stuff from other startup-rubys.
-
RE: Exit/Shutdown SU 7 ??
@unknownuser said:
Sketchup.send_action 57602
Undocumented feature but it works.
The doc shows:
21560 and up: causes a runtime ErrorSo is it official and where do you find such things?
@unknownuser said:
system("taskkill /im sketchup.exe /f")
Works but shows a cmd-window and is slower.
-
RE: [Code] ComponentInstance-add_entities v1.9
I run into a problem when I use add_entities from a startup-ruby.
The code line:@kombi_group_sel_def.instances[0].add_entities(@kombi_group_list)
throws an error : undefined method `parent' for nil:NilClass
My ruby (zAutostart.rb) loads after the ComponentInstance-add_entities.rb
When I disable the call in my ruby and start the command from the console it runs without problems.
-
RE: Model.save does not save
@unknownuser said:
It return true when you save over the currently open file?
And if you reopen that file - what do you get?It return true when I try to save to the currently open file!
But it stays the same size and when I reopen it I get the same as before. -
RE: Model.save does not save
@unknownuser said:
That's probably because SU has that file open and the Ruby script isn't allowed access to it.
But then it shouldn't return 'true' for success.
I would call it a bug.
Also the doc could be more improved with a sample with path and a hint to the forward-slash problem. -
RE: Exit/Shutdown SU 7 ??
After the problem with the Win32Api-code I searched further and found:
http://rubyonwindows.blogspot.com/2007/05/automating-applications-with-ruby.html
require 'win32ole' wsh = WIN32OLE.new('Wscript.Shell') if wsh.AppActivate(skpbasename+".skp - SketchUp") wsh.SendKeys('%{F4}') end
This works for me now.
-
RE: Model.save does not save
Thanks for the hint with the forward-slashes.
And I find some test-files in my 'Google Sketchup 7\Plugins' folder.But there remains a problem.
I can not save to the filename of my currently open file.
That does not work.
When I modify the filename and save to a new file then it works. -
RE: Model.save does not save
@unknownuser said:
? Aren't we talking about saving from Ruby?
Yes, I copy a empty SKP to my work-directory and start SU with the filename in the commandline-parameter.
So I stand in my SKP-file yet.
Now the startup-ruby does import my autocad-file and does some processing on it.
Now I want to save and leave SU.
The ruby save does not work. But when I choose File/save or CTRL-S then it gets saved.@unknownuser said:
Can you give an example of a filename with the path that doesn't work? Maybe you got some non-ASCII characters that causes problems.
No. My filesnames are as following:
20090708_080921161_samplecust@sampleurl_com_{E62CA959-8615-40C9-926E-4883168F8FEC}.skp
Date_time_email_GUID.skp
I also tried Hello.skp with no luck.
And why does the command only take a filename without path?
-
RE: Exit/Shutdown SU 7 ??
I tried the API-call from that link.
But unfourtunatly it does not work from a ruby loaded on startup.
When I type it from the Console after startup it closes SU. -
RE: Exit/Shutdown SU 7 ??
After some googling I found a post with the same problem:
http://groups.google.com/group/Ruby-API/browse_thread/thread/227bae3cdb6f84a3
I still wonder that such a big API still miss such basic things.
Automating Autocad is still much easier. -
RE: Model.save does not save
@unknownuser said:
Have you searched for the file name. Seeing that you give the method a relative filename, do you know where it's saved?
Yes it is there. When I press the File/Save it gets written with it's new size.
@unknownuser said:
What if you change one if your line to: savename = File.join(Fileskpdirname, skpbasename+".skp")
It gives a invalid filename-error.
Removing the path it does not complain anymore and return a true. But file is not updated.Maybe it is important that I do this from a ruby starting on SU-startup.