CutList 4 plugin for Mac questions
-
Hi,
I opened CutListAndMaterials.rb in TextWrangler (free)
I then used cmd F typed in UI:: this gave me to these lines which I which I clicked and changed as follows-
CutListAndMaterials.rb:3104:
@dlg = UI::WebDialog.new(getHtmlTitle, false, "CL4", 600, 720, 50, 0, false)
CutListAndMaterials.rb:3287:
@resDialog = UI::WebDialog.new(getHtmlTitle, true, "CLP", 980, 620)
In this one, the positiong is missing but I could see it lower in the code so change it to this-
CutListAndMaterials.rb:3289:@resDialog.set_position(50,750)
and then did a search for.set_position(
and found another, worked out what it was for, by using (500,500), then set it to this-
CutListAndMaterials.rb:3311:@resDialog.set_position(0, 0)
After that I searched for
.show
and one at a time changed and tested using 'replace' function to .show_modal [which stops them vanishing on a Mac]
CutListAndMaterials.rb:3133:@dlg.show_modal {}
CutListAndMaterials.rb:3300:@resDialog.show_modal {
CutListAndMaterials.rb:3319:@resDialog.show_modal {
I then used some code I found at a tutorial http://www.srww.com/blog/?p=1002
and changed the end of the file to change the place I find CutList in SU Menu, to this [because it makes sense]
CutListAndMaterials.rb:4390:
` # Add command to the File menuAdd CutList main entry
"Cut List" offers an html gui to select options and produce html and/or file output
if( not file_loaded?("CutListAndMaterials.rb") )
UI.menu("File").add_item("Generate Cut List") { interactive_generator }
endfile_loaded("CutListAndMaterials.rb")`
I was going to post the changes, but thought it more beneficial if you make the changes your self. That way you can look for and change other bits as well.
TextWrangler will also works with the .html files so some changes can be made in there if required.
After a change you need to save the file and for the ruby, restart SU, for html you can load changes in the Dialog with right-click 'Reload'.
Having said all this, it seems to me that Engineers Toolbox might suit this product better...
Have a look at naming conventions in other peoples CutList4 prepared drawings, I found some online.
have fun
john -
Thanks for this, driven! You're a wizard!
Normally I'd agree that modding code myself IS the best way. However at the moment I'm recuperating from chemotherapy, which makes me pretty seriously brain-fogged. Consequently, many tasks that would normally be easy are difficult to impossible. I'd love to have your Cut List functionality, but realistically I probably won't be clear-headed enough to mod the code for a month or more. I'd sure appreciate it if you'd help me out by sharing your version -- PM me if you prefer to do it privately.
Any ideas on the alphabetization issue, anyone? Yes, I can cut-and-paste into TextWrangler and have it alphabetize the lines. But it would be easier to just have Cut List do the right thing if there's a simple fix.
-
I'll PM it,
for the alphabetical list...
-
John, which version of CutList do you have?
-
my own...
seriously a tweaked version of 4.0.7
I think it's the current one??
john
-
I knew you'd tweaked it. 4.0.7 is not the current version, though. 4.1.1 is current and some things have changed since 4.0.7.
-
have you got a link for 4.1.1,
only grabbed it when the question came up 2 weeks ago, and I'm keen to make any/all WebDialogs work on macs, so I tweaked it,
I'll tweak the new on if it needs it...
john -
You might want to talk to the author about that.
-
I found it
http://www.box.net/shared/ce18vpk36l@dave
the copy-write allows for mods and redistribution, but I'd send him a working version and I'd ask before posting a mac version on the open forum here and only then, if he couldn't update his main one...john
-
Yes. That's the link. Sorry. I went to bed after my last post.
I wasn't thinking about the copyright but more the ethics. I think it would be ethical to talk to him before you start posting rewrites of his plugin.
Advertisement