Jump to content

GioPet

Member
  • Content Count

    87
  • Joined

  • Last visited

Everything posted by GioPet

  1. 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!!
  2. 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
  3. 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
  4. 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
  5. 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
  6. 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
  7. ..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
  8. 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!!
  9. ..script is half way done.. will keep you posted! G
  10. 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
  11. 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.
  12. 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

 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×
×
  • Create New...