Jump to content

GioPet

Member
  • Posts

    98
  • Joined

  • Last visited

Everything posted by GioPet

  1. Hello Everyone! Great Inputs guys!! Assembly, this is great, exactly what I needed.. hopefully will not take to long before the next update! G
  2. G-Pang, Great suggestion! I will implement this and post it as soon as it's done. Thanks G
  3. Hello Everyone! Here is a new Downloadable Script for the Smart Paste! Download both attachments (_DialogBuilderUtilities.txt is needed too) or View the Script Here http://pastebin.com/18FHi3iv I have Re-written the Script using Resource Lists to Build the List Browsers as suggested by Orso. This worked Smoothly (thanks orso). I also worked out the Undo Button. I had to use arrays because I faced some problems in outputting the User selections to a txt file and then reading them back to Undo the Actions. If anyone can give me some hints on this, it would be good.. I still have the intention to implement the functionality of saving the User's Choices so that the plug in will be able to do part of the Job automatically, without the User to always re-select already made associations (Matt, I think you suggested this at some point..) Many Thanks to everyone for helping out with this so far!!! Gio PS: this script has only been tested on a Mac version of Vectoworks 2009. Please let me know anyone experiences problems with other versions.
  4. Ciao Orso! thanks for the suggestion. I hadn't thought about passing obj type 94, it actually sounds a much more straight forward way to build the resource list. I will go through the script again, hopefully soon.. If anyone who has tried the plug in had other suggestions, please let us know! Bis Bald G
  5. Thanks Matt, i will test what you said sometimes next week, and still need to work on the Undo Button!! Now, here is a Cleaner version.. .vsm File or http://pastebin.com/m67ebd879 I got rid of some local and Global variables that were flying around without being very useful.. have a good weekend G
  6. aha.. I had just edited the previous post.. in the meantime I worked out this ForEachObject(AssignThem, SEL); SEL criteria did the job, when calling the procedure PROCEDURE AssignThem(h :HANDLE); BEGIN IF GetClass(h) = LOC_ClassArray[x] THEN SetClass(h, assign_to); END; thanks anyway!
  7. Hi Matt, i hope the weather is getting better over there! (or at least not worse). I found some difficulties on how to create a record of user's selections, therefore i defined the Assign Button in a way that it immediately processes the changes to the drawing when pressed.(though i might go back to that idea of the selections record) I uploaded here the .vsm file Uncrypted and the .txt file needed for the Dialog. (for some reason Vectorworks gives an I/O error when I try to Encrypt the script, saying it cannot include the .txt file..) I am now trying to go around the problem when Pasting Text inside textfields.. and will start cleaning the whole script and making it more Accessible to others. looking forward to Feedbacks. Cheers G
  8. Hello Everyone! I had some time to carry on the Smart Paste Script. Here is a snapshot of the Dialog as it looks like now. [img:center]http://techboard.nemetschek.net/ubbthreads/ubbthreads.php?ubb=download&Number=3640&filename=Smart%20Paste.png[/img] At this stage i have to define what the ASSIGN, PASTE IN, and UNDO buttons actually do inside the script.. I was thinking of proceeding this way: When the User assigns one or more classes to one of the exisiting, the ASSIGN, PASTE IN and UNDO Buttons record the user's selection and update the information in the List Browser accordingly. Classes are NOT being assigned and deleted at this moment, but the dialog only Records the associations done by the user, which will be processed once OK button is pressed. with this approach, the Cancel button can easily Quit the whole Smart PAste Procedure, leaving the Drawing unmodified. How does this idea sound? You can find the script at http://pastebin.com/m31e55e0b (the script is still a bit messy..) Thanks G
  9. Hi Justin, I am also learning a lot from other scripts and suggestions. ..and thanks for the observation, I didn't know it was best not to set VAR for each sub. I have been writing those sub procedures individually, and that's why the same VAR are re-called all the time. I will revise a ''clean' version later. BY the way, Does someone have any idea about how to resolve the behaviour of the script when Copy/pasting TEXT inside a textfield?? G
  10. ..yeh, it will probably take me quite a while to get the LIst Browser working.. Though it would be really the most efficient way of handling the 'Smart Paste'. i will think about a way to tackle this in a couple of steps, to come up with 1 or 2 working scripts before I manage to get the one that is spot on. well, let's see, in the end it comes down to an issue of time.. so I am trying to equip myself with a good amount of patience.
  11. ) of course.. But i would love to use this as soon as possible!!!!
  12. yep yep, Mat you just described exactly what i was thinking of doing.. Ben, thanks for the great links.. go for List Browser punishment! would be nice to get this done by the end of the week, i'll do my best, but we always have to deal with several things at the same time... so i can't promise! Will Keep you posted anyway!!
  13. Yay!Thanks a lot guys! Mat, that's great, a much easier way to work it out! ..indeed, there was also the mistake that Ben pointed at.. I will implement the Dialog Window to give the possibility of eventually add a new incoming class. I still think it would be good to preview in window all the incoming classes.. I will keep posted further improvements! THanks again for the great help! G
  14. THanks Charles, that does what I needed! However, now I have problem with the Re-Allocation of DYNARRAYS of Strings.. (i thought it would work to clear an index and then RE-Allocate it and RE-Populate it, but I haven't been able to..) I have now created a New POst in order to address better the intention of the Script I want to develop. PLease, continue this Thread in the Topic Copy/Paste Objects and Reassign Incoming Classes to Existing Classes
  15. Hi Everyone. In the office where i work, we have experienced a big disruption in the workflow of big projects/drawings, caused by the AUTOMATIC of CLASSES (most of the time undesired) when using COPY/PASTE. I thought this could interest many people so I have started working on a script to implement the functionality of the PASTE COMMAND. The script develpod so far executes the command PASTE and prompts a Dialog Window that allows to Assign ONE of the incoming classes to one of the existing, then deletes it. Here is a Link to the FIRST VERSIOn of the script. I was trying to create a loop that would prompt the Dialog Window until ALL the incoming classes have been assigned to existing classes.. though I am experiencing some problems with the RE-Allocation of DYNARRAY of STRINGS.. (I imagine there's a first time for everyone..) I am posting the script as it is so far, in case anyone can feed in some help and suggestions You can find the Script here: http://pastebin.com/m7f8d4982 NOTE THAT THE SCRIPT WORKS FINE UNTIL THE FINAL LOOP AT LINE 228. TO TEST THE DIALOG WITHOUT LOOP, DELETE LINES 228, 235 until 244
  16. Here is a link to the script i have written so far: http://pastebin.com/m5287bf89 it can be copied and pasted directly into VectorScript Editor inside Vectorworks. This script executes the command paste and prompt a dialog window to Assign ONE of the new classes to one of the existing, then deletes it. Now I would like to create a Loop to keep prompting the dialog Window until all new classes are assigned. Is there a way to retrieve the index of an Array of strings, given its string? G
  17. hi Mat,Here I am again. I just fixed the Bad Behaviour (the array containing the extra classes only was populated with a wrong calculation..) I have gone through the script again and step by step verified the content of all the arrays that i have populated (classes before pasting, after pasting, and only the extra classes). It seems that VectorScript cannot manipulate Arrays of strings so that an operation like Arr3= (Arr2-Arr1) doesn't work to obtain the third Array (containing the newly pasted classes only). For this reason I didn't sort the classes, but reasoned this way: Defined two Variables diff:=NewCLASSNUM - OldCLASSNUM; StartClass:=(NewCLASSNUM - diff)+1; the VAR diff gives the number of new classes being pasted, the StartClass gives the ID of the first New class. All the other new classes will have ID growing from StartClass up to NewCLASSNUM. So I Populated the 3rd Array with this: y:=1; FOR x:=(StartClass) TO (NewcountClasses) DO BEGIN IF y<=diff THEN BEGIN ExtraClassNames[y] := NewClassNames[x]; y:=y+1; END; END; Now I have all the ingredients. I hope this still makes sense to you. I will post the full script of these procedures in a few hours. Then i will start working on the interface of the menu.. laters. G
  18. ..Small question.. the beta version of the script is not behaving very well.. I have created 3 dynamic arrays (Existing Classes, Classes after Pasting, New Classes Only), then I populated them. In this process i haven't sorted the Arrays. Can this be a problem? It seems to me that VectorWorks assings ClassLIst value to New classes following the order of creation.. that's why I thought that sorting the arrays wasn't necessary (the newly pasted classes would be added at the end of the array). Does this make sense? G
  19. yeh, the version 2.0 will be great.. Though I am already thinking to make a 1.5 version too!! At the moment the script Assigns and Deletes one by one the Newly pasted Classes, until they are all Reassigned and Deleted... I know, it is not a very flexible behaviour.. (but this seems to be due to my scripting skills..) So, version 1.5 will probably allow to deal with all the new classes in one window, and also will include a 'Non delete' Option! then.. i will challenge 2.0!!
  20. ..script is half way done.. will keep you posted! G
  21. Yep yep, nice idea to implement the new Paste Function! THanks Matt. I will post the script as soon as I finish and test it! Any new suggestion is welcome! G
  22. Thanks Matt! Precious hint.. The creation of new classes when pasting is the main concern indeed. Yet I would like to find a way to obfuscate the command to create of new classes too.. However, I will follow your advice and develop the Paste command as you suggested.
  23. Hi, I am working on a plug-in to "lock" the drawing class structure, in order to control the automatic creation of new classes when Copy/Pasting from other drawings. At the moment I am wondering if there is a way to Enable/Disable the NameClass Function with a VectorScript or whether it has to be implemented via SDK. This would help a lot the workflow of certain projects we have at my office, Therefore any suggestion will be very appreciated. Thanks
×
×
  • Create New...