Jump to content

Julian Carr

Distributor
  • Content Count

    283
  • Joined

  • Last visited

Community Reputation

134 Spectacular

6 Followers

About Julian Carr

  • Rank
    Journeyman

Personal Information

  • Location
    Australia

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. I had actually been working on this for an internal project so this request prompted me to finish it (Layer Manager Worksheet.zip). The worksheet is editable so will push data back to the layers. It includes a short video describing how it works.
  2. Thanks Wouter. Strangely, I could not get it working via a button click, but it does work with a double click on the PIO, which is even better. Thanks again.
  3. If you have a PIO that has something in the profile group, you can enter that group using: DoMenuTextByName('Group Navigation Chunk', 1); That produces an error if called from within the PIO however , which is probably not surprising. Does anyone know of a way to jump into the profile group from say a button click in the OIP? Thanks.
  4. Not sure if it can work for you Sam, but I have two methods for doing this. The first is using symbols folders, so only the source symbols within a particular folder will get make it into the list. The second is using a prefix or suffix within the symbol name in conjunction with GetActualNameFromResourceList(). I don't think you can get a handle to symbols in a list though, which is obviously a requirement for checking for an attached record.
  5. What I want to do is to write to the read-only Plant Record that is attached to Plant objects. Exactly what I want to do is to clear most of the record fields in the Plant Data tab when editing the plant style. Currently you have to do it manually one line at a time so it is quite time consuming. It needs a Clear All button because many users will duplicate an existing plant style to create a new plant, and don't necessarily want this data duplicated. Here is the script I am working with, but I need a way to temporarily write to the plant record. It may not be possible. Procedure CPD; Procedure DoIt(h1 : HANDLE); VAR i1 : INTEGER; BEGIN FOR i1 := 1 TO NumFields(GetRecord(h1, 1)) DO CASE i1 OF 3,4,6,14..39: SetRField(h1, 'Plant Record', GetFldName(h1, i1), ''); END; ResetObject(h1); END; BEGIN ForEachObject(DoIt, (Sel=True) & (PON='Plant')); END; Run(CPD);
  6. Can someone remind me how to set a record format to Read-Only or one that is set that way to NOT Read-Only? Thanks!
  7. Best to use Modify menu > Simplify Mesh because the level of simplification will vary from mesh to mesh, so provided the imported mesh is selected, adding this line to the script will activate this command and allow you to adjust each mesh as you go: DoMenuTextByName('Simplify Mesh', 0); There is no other way I know of to do this in Vectorscript that would fully automate the process.
  8. Richard Diehl actually commissioned me to create the Table and Chairs object for Vectorworks 8 and it has changed very little since then. There are so many things that could be added to it along with the chair position, like using a symbol based chair, place settings, table cloths, etc. It could certainly do with some love.
  9. I'm not sure I can be of much assistance here Andy. Because my dialogs are usually jamb packed full of controls, it has always been a bridge too far to fit those by style/instance widgets in. For example: This dialog just fits on a 13" screen. For this PIO I do still use styles though, but only as a way to transfer hundreds of different styles from the library into the tool. Once placed, the instance is no longer styled and that works in this case because there are very few repetitions of any particular setup in the drawing, so not much benefit from being able to pick if controls are by style or instance . When you use a style with this object, it comes into the drawing as being unstyled. But if you have managed to get all the widgets into your dialog then I wouldn't have expected things to be too difficult. Maybe someone else has some clues?
  10. Don't have much time but... A1. Yes must be event enabled. A2. You will need this: gFlag := SetObjPropVS(kObjXSupportsStyles, TRUE); { 49 } { Controls whether a parametric type support plug-in styles } and maybe these: gFlag := SetObjPropVS(kObjXPropHideStyleSettingsButton, TRUE ); { 69 } { hide unwanted style editing buttons } gFlag := SetObjPropTxtVS(kObjXPropSupportResourcePopup, 'Object Styles/MyStyledObject'); { 53 } { specified the default content folder } A3. Depends if you are using dialogs to access parameters. If you you have a lot more work to do. If not, then you can let Vw handle it from memory. A4. There are other events you may need too: 60: BEGIN { Edit Plug-in Style } vsoSetEventResult( -10 ); {kObjectEventHandled} { using -10 here causes the object properties dialogue to open next } END; 61: BEGIN { Create Plugin Style } vsoSetEventResult( 0 ); {kObjectEventHandled} END; 62: BEGIN { Update Styled Plugin Object } vsoSetEventResult( 0 ); END; 63: BEGIN { Finalize Create Style } vsoGetPluginStyleSym(gh1); SetAllStyleParams(gh1, 0); { this sets all parameters to not use the style } vsoSetEventResult( 0 ); END; 64: BEGIN { Finalize Update Styled Object } vsoSetEventResult( -8 ); END; 65: BEGIN { Style Widget Chosen } vsoSetEventResult( 0 ); END; { Create Style order of events: 61, 63, 60, 62, 64 } { Edit Style order of events: 60, 62, 64 }
  11. Not surprising I guess (editobjectspecial). I use profile groups in WinDoor to store symbols. Here's a code snippet: { put symbol instance into profile group } Symbol(SymName, 0, 0, 0); hSym := LNewObj; h1 := GetCustomObjectProfileGroup(ghParm); IF h1 = Nil THEN Flag := SetCustomObjectProfileGroup(ghParm, hSym) ELSE BEGIN h2 := FInGroup(h1); IF (h2 <> Nil) & (GetTypeN(h2) = 15) THEN BEGIN DelObject(h2); SetPref(9871, True); Flag := SetParent(hSym, GetCustomObjectProfileGroup(ghParm)); SetPref(9871, False); END; END;
  12. Try using: EditObjectSpecial(SymHandle, 4); Using 4 as the second argument will just jump you straight into the symbol based on whether the view is Top/plan or not - no dialogue. Curious. Why can't you use the profile group?
  13. There is also these procedures which will get and set the brightness: GetLightInfo(h : HANDLE; VAR lightType, brightness : INTEGER; VAR isOn, castShadow : BOOLEAN); SetLightInfo(h : HANDLE; lightType, brightness : INTEGER; isOn, castShadow : BOOLEAN); I think you can also do this using Get/SetObjectVariableReal() using 51.
  14. Actually one thing might work. If you run the script from a menu command, it might avoid removing focus from the worksheet, which is what clicking in a script palette is doing. You could use the RunScript command with a keyboard shortcut, then have your scripts in a folder if there is more than one. Alternatively create one or more .vsm's and put the script/s in that, then call them with keyboard shortcuts. If you do this, the only call you will need in the script is SetWSCurrentCell(h,currentCellRow,currentCellColumn);

 

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...