Jump to content

Pat Stanford

Moderator
  • Posts

    12,597
  • Joined

  • Last visited

Everything posted by Pat Stanford

  1. If you are using WinDoor from the Australian/New Zealand version it will be different. If you are using the standard US Door tool, there is an option called Use Symbol Geometry (or something similar). You draw a symbol that looks the way you want and then tell the Door object to draw using that symbol. That way you get the look you want, but it is still a Door and can be scheduled.
  2. I don't know if I am supporting or disputing @bgoff but here is a script that "kind of" extracts plants from a landscape area. I am supporting him in that this script needed 150 lines of code with almost no error checking and with results that are not perfect to get the plants out of the LSA. A version that would meet VW quality standards would be at least a couple of thousands of lines of code and a lot more QC than the two simple LSA's I tried this on. I am disputing him in that I was able to write a script to get the data I got out with only a few hours of coding and no previous knowledge of the internal structure of LSAs. In any case, the script is here. I am willing to put a little more work into it if the group thinks it is useful. I will need you to act as beta testers for me. I am especially interested to know what settings from the Plant PIO defaults should be changed. In my testing, I think that the plants in the LSA do not have any Tick Style and have the Mass Outline set to None even though the plants I chose have those options turned on. I you notice other options like that that should be turned off when the new plants are created, or things that should be turned on when new plants are created, let me know. This script takes a single selected Landscape Area on the active layer and creates a copy of all the plants in the LSA as a group on top of the LSA. At the end of the script, the new plant group is selected and the LSA is deselected. In the Resource Manager create a new VectorScript and paste everything in the code block below into that script. From the Script Palette, double click on the script name to run the script. HTH. Procedure DuplicateLandscapeAreaToPlants; {December 13, 2020} {©2020 Patrick Stanford pat@coviana.com} {Licensed under the GNU Lesser General Public License} {No Warranty Expressed of Implied. Use at your own risk.} {A Vectorworks Landscape Area can not readily be converted to a group of individual plants} {This script attempts to overcome that.} {Inside a Landscapre Area object are two groups (and other components). The first group contains one} {instance of each type of plant in the mix of objects in the LSA. The second group contains} {individual symbols extracted from the plant objects for each plant in the plant group.} {This script uses the symbols in the first list to find the original plant objects in the Resource} {Manager. It then creates a new plant object for each of the plants in the second group and} {copies the Parameter Record from the PIO in the Resource Manager to the new plant object.} {It then overrides a couple of parameters such as Tag Type that should not be on for objects in a} {landscape area plant, but might be on in the master PIO Parameter Record.} {The script only handles planting mixtures of up to 99 plant types.} {Use at your own risk. Very lightly testing. Backup everything before using this script.} {Here be monsters.} Type PS=Structure {Structure to allow lookup of "sample" symbols in the Landscape Area [LSA]} ID :String; {plant ID} PD :STRING; {Plant Description} Num :Integer; {locator for record} Hd :Handle; {Handle to the "sample" symbol in the Landscape Area} End; Var H_L1 :Handle; {Handle to an object in the LSA} H_G1 :Handle; {Handle to an object in the first group in the LSA} H_P1 :Handle; {Handle to the plant object currently being created} H_S1 :Handle; {Handle to the "Sample" symbol. Stored in the Structure} SymName :String; {Symbol Name of the placed symbol in the LSA} N1,N2,N3,N4,N5:Integer; X1,Y1,X2,Y2: Real; B1:Boolean; A1:Array[0..99] of PS; {Array of structure to hold the data on the "sample" symbols} {*********************************************} {This sub procedure replaces all of the values} {in the parameter record of the second object } {passed with the values of the parameter } {record of the first object passed. It them } {overrides values as necessary. } {Hd1 is a handle to the "sample" symbol that } {matches with the placed symbol in Hd2. } Procedure ReplaceRecordValues(Hd1, Hd2:Handle); Var Num1 :Integer; {Counter to loop once through all the fields} { Str1 :String; } Rec, Fld :String; {Strings to hold the record name and field name} Hd3 :Handle; {Handle to the Parmetric record of the PIO in the Symbol} {Definition in the Resource Manager.} Begin Num1:=1; {Start at the first field} Hd3:=GetParametricRecord(Hd1); {Get the handle to the Parameter Record} Rec:=GetName(Hd3); {Get the name of the Parameter Record} While Num1<NumFields(Hd3) do {loop through all the fields in the Parameter Record} Begin Fld:=GetFldName(Hd3,Num1); {Get the current Field name} SetRField(Hd2,Rec,Fld,GetRField(Hd1,Rec,Fld)); {Set the field value in Hd2 object} {To the value in Hd1} Num1:=Num1+1; {go to the next field} End; {Lines after this separator are "manual" overrides for fields} {that you don't want the PIO defaults for.} SetRField(Hd2,Rec,'tag display','None'); End; Begin PushAttrs; ProgressDlgOpen('Creating Plants from Landscape Area',False); ProgressDlgStart(10,10); H_L1:=FInGroup(FSActLayer); {Handle to the first object in the LSA} H_G1:=FInGroup(H_L1); {Handle to the first object in the first group ["sample" symbols']} N1:=1; {Start Counter at 1} {This block sets up the Structure with data on all the quote "sample" symbols and what PIO} {in the Resource Manager they relate to.} While H_G1<>Nil do {Repeat as long as there are more objects in hte "sample" group} Begin H_S1:=FinSymDef(GetObject(GetSymName(H_G1))); {Get the handle to the PIO} {In the Symbol Definition} {In the Resource Manager} A1[N1].ID:=GetRField(H_S1,'Plant','plant ID'); {Store the plant ID to the struct} A1[N1].PD:=GetRField(H_S1,'Plant','PlantDescription'); {Store the PlantDescription} A1[N1].Num:=N1; {Store the couunter to access} {the data later} A1[N1].Hd:=H_S1; {Store the Handle to the PIO} N1:=N1+1; {Increment the counter} H_G1:=NextObj(H_G1); {Go to the next object} End; {This block Creates a new Plant object at the location of each of the plants in the LSA} {and updates the parameter record to match the data from the PIO definition in the } {Resource Manager.} GetSymLoc(FSActLayer,X1,Y1); {Get the "Insertion Point"} {of the LSA to use as an } {Offset for placing the new} {plants. Plant locations } {inside the LSA are relative} {to this location.} SetDSelect(FSActLayer); {Deselect the LSA} N2:=1; {Counter for Progress message} BeginGroup; {Start a group to hold new plants} While H_L1 <> Nil do {Repeat for each object in LSA} Begin If GetTypeN(H_L1)=15 then {Only process Symbols} Begin GetSymLoc(H_L1,X2,Y2); {Get relative location of symbol} SymName:=GetSymName(H_L1); {Get Name of symbol.} N3:=1; {counter starts at one.} While N3<=99 do {make sure we don't go past end} {of the structure array.} Begin If SymName=A1[N3].PD then N4:=N3; {find which entry in the array} {matches the symbol name and } {store that index in N4.} N3:=N3+1; {increment to check next object.} End; N2:=N1+1; {increment progress message ctr} ProgressDlgSetTopMsg(Concat('Processed Plant: ',N2)); H_P1:=CreateCustomObject('Plant',X1+X2,Y1+Y2,0); {Create new plant} ReplaceRecordValues(A1[N4].Hd, H_P1); {Call Procedure to change } {parameter record values so the} {plant matches the one in the} {LSA.} H_L1:=NextObj(H_L1); {Go to the next plant in the} {LSA.} End Else H_L1:=NextObj(H_L1); {if the object was not a symbol} {go to the next obect in the LSA} End; EndGroup; {Complete the group after all } {symbols have been processed.} ProgressDlgClose; PopAttrs; End; Run(DuplicateLandscapeAreaToPlants); {code to run the script.}
  3. Make sure you are in the second or third mode of the Selection tool. If you are in the first mode (Disabled Interactive Scaling Mode) then the control points won't show as you would not be able to move them.
  4. I think you have to do it the old fashioned way and do the math and set the Suffix to the units manually. For Feet and Inches in cell B3 that you want to show as Inches, it would be B3*12 and then Format the cell as Decimal and set the trailer to " Inches" (note the space in front of Inches). Other conversions for other units. These formulas and formats can be done in Database Header cells and apply to the entire database column.
  5. If I am understanding you, then no there is not a way to do what you want. My understanding of your question is that what you want to do is have column F be a Record.Field plus also pull data from somewhere else and store it into that record.field. If that is correct, then there is not a simple way to do that. You could COPY the data from Column E and PASTE into Column F, but no way to simply do it by formula. It might be possible to do with some of the new Worksheet Script functions in VW2021, but I have not played with them yet to see.
  6. I think you want SetToolWithMode. CallTool operates once inside the scope of your script. SetTool leaves the tool selected after the script completes.
  7. Copy and Paste Layer By Layer is the typical file resurrection technique. Some people say it works better if you swing a dead chicken while doing the copy ;-) For some reason it does seem that more Windows users are having trouble with VW2021 than Mac users. Usually it is the other way around. The reason I asked about the template is I was wondering if there could be a corrupt object in your template that is causing the problem in both files. You might want to send the file to VW Tech Support and ask them to take a look. They can often find things the rest of us can't.
  8. Not able to replicate here in a 2 minute test. Did both files start off from the same template file?
  9. It looks like it might be a bug in VW2021, but I will let people who actually use Landscape areas on a regular basis help make that decision. What it looks like is happening to me is that it is trying to transfer the Landscape Area Name. When it does that and realizes that there are multiple landscape areas with the same name it stops transferring any more information. And, it looks like there is another bug in the work around I was going to suggest also. Landscape Areas use a concept called Styles. You can define the "Style" (which can include the plant information) of a Landscape Area and then apply that style to other Areas. Each parameter of the Landscape area can be assigned by the Style or set to be individually settable for each instance. This should have let you get what you need just by creating a style. BUT, at least in my quick test, I am not able to save the settings from a new landscape area that has had parameters changed to be a Style. Usually under the Style pulldown there is an option for "New Plug-in Style from Unstyled Plug-in." If you create a new Landscape area the new from unstyled option is there and you can create a new style. If you then edit the style all is well. If however before your create the style you change the plant settings (and probably any other settings as well), the New Style option is no longer present. So the best answer I can give you right now is to create a new style, recreate your plant settings and then apply them that way. If you do go this route, make sure that you set the Landscape Area Name to be by Instance instead of By Style or you will end up overwriting the Landscape Area Names. I know there are a couple of Landmark users who follow me. Can you guys comment on these items please? Are these bugs? Do you know if they have been reported?
  10. Have you checked the Eye Dropper settings under the wrench and pencil icon in the Mode bare and made sure the PIug-In Parameters button is checked?
  11. Are you using a custom workspace? If so, please try one of the default workspaces. If it works there then you need to recreate your workspace starting from one the 2021 standards.
  12. It could probably be scripted or even automated using an AppleScript, but the development time would be multiple hours or 10s of hours. How about creating a temporary "shuttle" file with both sets of symbols and then using the eyedropper? You could then copy/paste the symbols into your other file. Or just import and place all of the "old" symbols into the new document temporarily? More details please. How many different symbols are you looking to do this for? How do you identify which symbol matches between the two sets? Are the records attached to the symbol instance or the symbol definition? How many fields in each record?
  13. The Eyedropper tool has a record mode. It appears to move records that are attached to symbol instances. It attached the Record format and brings over the data from the picked up object. I did not test on symbol definitions.
  14. Post a file with a several sections of the fence and someone will likely help to figure it out.
  15. I don't have a problem with how Dropbox operates. It has been smooth and flawless in terms of syncing. We don't even have a local server, but instead let everyone keep a local mirror on their machine. Our Dropbox folder is currently running about 45GB, so this is reasonable. If it were to get substantially larger, then we would need to rethink how we operate. As I said above, the biggest issue to me is not being able to get a link that refers to someone's local copy. I want to be able to send a Dropbox link that opens Dropbox in a web browser if I don't have a local copy but instead shows me (or opens) the local copy it is exists. I don't use, and don't want to use any of there other "offerings" form dropbox like esignatures, or half baked document creators like Paper. I much prefer separate tools that do what I want them to do but store those files on Dropbox. Since they started adding all the other features, they have basically left the "we are a big hard drive in the sky" idea and have stopped making improvements (at least that I can see.) But the local file link idea must be harder than I think because none of Dropbox's competitors have it either. :-(
  16. First make sure the buttons at the top left of the Resource Manager are selected. Each one is for a different set of resources. Application Folder/Workgroup Folder/User Folder/Favorites/Cloud (service select). If none of them are selected you won't see anything in the RM. If that does not give you what you need try choosing the Refresh Libraries option under the Gear menu. HTH
  17. It is only simple after you know about it. Until someone points a lot of things out they are impossible. Too many hidden options with low discoverability, but With so many options I don't know how to make it more discoverable.
  18. Look and see if you have a Class called Section Style. If so, try editing the Fill and Line attributes in the Class.
  19. I use Dropbox, but I don't like or trust it. All I want it to be is a file repository ("A Feature" in Steve Jobs speak). Versioning is part of that. I don't want them adding all of this extra file manipulation stuff like Paper etc. And the thing that drives me most mad is that there is no way to get a link and see if I already have a local copy of the file instead of throwing me to the web. I would pay way more than the $1000K/year we are paying for Business access if I could send a link and let everyone look at their local version. But, I am glad you are happy and it works for you.
  20. If you choose to go with the Auto Save mode for backups, make sure you have a good archive in place of recent versions. You don't want to find that you have been working away for a few hours and realize that you were in the wrong file, or working with incorrect data and don't have any way to get back to where you were at the start of the day. That is the biggest reason for using the Copy option. But if you files can't be restored from the Copy, then you are out of luck anyway. I have never had a copy that would not reopen. If anyone does see that, please submit both the original file and the corrupted copy as a bug so VW can figure out why it is happening.
  21. Here are a few of the mostly 2D differences: Data Visualization - Ability to override object attributes on the fly by parameters Addition of the Data Manager Data Tag enhancements Improved speed and smoothness due to Vectorworks Graphics Module Direct edit in list interfaces (i.e. rename classes and layers in the Navigation Palette + More) Enhanced Title Block Improved Notes Manager Optimized PDF Exports Smart Options Display Quick Search Smart Markers Structural Grid Tool Detachable Palette Panes (eg see the Shape and Data pane of the OIP at the same time.
  22. You should be able to use the Unicode symbols that are part of your font to find a glyph that is an X or Checkmark that will work for what you want. Worst case make those text fields a different font that does have have you want. Just in case the fonts don't come through on the forum, I attached a screen shot as well. ✓✔︎✕✖︎✗✘❏❐❑❒☑︎☒☐
  23. The location of the user folder can be set in Vectorworks Preferences:User Folder pane. But if you are doing this for a large number of students you might be better off making a "hard link" (sorry I don't know the Windows term) from the location in the App Data folder to the location you want the data stored on OneDrive. On Mac I have used links to relocate a subset of the User Folders and it worked fine.
  24. This post did not specifically say it installed, but since they were testing the operation I think you could assume that it did.
×
×
  • Create New...