Jump to content

Wizard12

Member
  • Content Count

    16
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Wizard12

  • Rank
    Greenhorn

Personal Information

  • Location
    United States

Recent Profile Visitors

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

  1. sorry, it posted before I was finished...my bad.
  2. JBenghiat thanks for the info, fortunately there are only 2 parameters that need to display a calculation. How would the syntax look for the GetRField method. Just a note, I did have to change a bit of Jesse's code for the Widget ID because the common name in the inti event is a changing variable so in the recalculate part of the code I added an extra update. I structured the code like this to change the wiget Id for placement (these are many more variables than I show under each procedure, just an example to show the structure) PROCEDURE LeftEndStudPar; BEGIN PSWidthBool:=True; WC2:=4000; {widget Id} LT:=35; {widget location} END; PROCEDURE RightEndStudPar; BEGIN PSWidthBool:=True; WC2:=4001; LT:=109; END; the 5: section is structured like this: LeftEndStudPar; ParametersInitial; RightEndStudPar; ParametersInitial; {procedure to place the widgets and PParameters and the conditions for enable and visibility are in a procedure called ParameterPrep in 41:} In the ParametersInitial Procedure, IF(PSWidthBool=TRUE) THEN BEGIN result := vsoInsertWidget (LT, 13, WC2, 'Test', 0); vsoWidgetSetIndLvl (WC2,2); END; there is also a similair stucture for the 41: section In Jesse's example, the only thing I changed was grabbing the the actual widget ID. 3: sumLength:=PPanelDepth-PSubstrateThickness-PLaminateThickness; sumStr:=Concat('Stud Width:',' ',Num2StrF(sumLength)); IF GetCustomObjectInfo(objName,objHd,recHd,wallHd) THEN SetRField(objHd,'Update Stud Width','sumResult',sumStr); vsoWidgetSetText(4001,sumStr); vsoWidgetSetText(4002,sumStr); This did work but if there is another method, I'm open to learn more!
  3. Jesse, Many Thanks......I figured out your first example, it worked great! That is definitely what I was looking for!
  4. Thanks Jesse. Oh yes I have that PDF, its old for sure. The one thing I've noticed is that there isn't a ton of information about widgets, very minimal examples. Thanks for you help! So on the first attachment, (.vso) the alternate names are different? maybe that's why it didn't show up in the OIP. I can understand that if that's the case, it makes sense since the text widget doesn't have two names. Doesn't the widget use what would be the 'alternate' name anyway? that's the problem, my OIP has 340+ parameters so some of which are Procedure run through a subroutine to make the sections for each of the studs parameters. Since each stud has the same amount of parameters I use variables to place them in collapsible sections but the amount of studs changes based on the panel type which the OIP omits or adds the correct ones per configuration...that was fun to code, not. The only 2 studs that receive this 'readout' I'm going for are the end studs in which the user can't change the stud width (panel depth determines that), only the widths of the intersection studs are user filled. So the text display is in only 2 sections for the studs which is run through a subroutine...so I have that little issue to contend with. I'm going to hit this up in the morning but thanks again for your help!
  5. Thanks for the feedback Jesse! I tried to place the file in my plug ins folder (roaming under app data) but it did not appear through the script editor. I was able to use NotePad++ to view it and copy it. It had 2 parameters right? Length1 and Length2? I entered those 2 and it compiled. It did not show anything except the initial dialog but nothing appeared in the OIP so I don't know if it worked. Based on what your example shows, I will try get it to work. I'm seeing the vsoWidgetSetText as being one of the key functions here. Thanks for this example, it at least points me in the right direction.
  6. No, it remains the same calculation. Those are defaults for the Plug-in, it seems to be stuck on calculating only those. Its like nothing calculates in the 5: {kObjOnInitXProperties} or 41: {kObjOnWidgetPrep} sections of the code. I think its because those sections just deal with the actual widget and its look but not really what the content is. This is a no brainer in the main part of the script that pertains to the creation of geometry, calculations are straight forward. Is there a way to store that parameter besides using a record attachment? Seems like I tried something like that but was not successful. If you have an idea how to write that and where to put it in the code, that would be awesome. This Plug-In is for creating Wall Panels for the Exhibit Industry....there are over 340 parameters due to many types of panel configurations and intersections. Many Thanks Pat, you've helped me a few times in the process of writing this Plug-in.
  7. The 2.752" dimension always remains the same regardless of me changing the panel depth. I know its possible based on seeing that you can write all the parameters including the field contents to a text file but the only examples I can find show every parameter and field value in a list not just obtaining specific desired field values.
  8. Hi Pat, thanks for the reply. I have a need to display the calculation of certain parameters in the OIP. I have a widsget (static text) in the OIP that is to display to the user the stud width based on a calculation of 3 other fields that are named parameters: Panel Depth, Substrate Thickness and Laminate Thickness. The result will be the stud width based on the calculation of these 3 fields. I tried just a straight forward approach but it only calculates what seems to be my default values of my parameters, when I change any of the 3 the resulting calculation does not change: Maybe my widget type is wrong. result := vsoInsertWidget (LT, 13, WC2, Num2StrF(PSStudWidthCalc), 0); vsoWidgetSetIndLvl (WC2,2); PSStudWidthCalc would be PanelDepth-Substrate Thickness - Laminate Thickness.
  9. I was wondering if anyone has an example of retrieving parameter values from specified PIO parameters and doing a calculation to display as static text on the OIP. Lets say I have 3 values I need to retrieve, PPanelDepth, PSubstrateThickness, and PLaminateThickness (PIO parameters) and use these in a calculation: PPanelDepth-PSubstrateThickness-PLaminateThickness and then display the result in the OIP, how do I achieve this? I've seen examples for getting all the parameters and their values and then writing it to a file but no examples of individual field extraction. I understand that you need to get the handle to the object first to retrieve the field contents but I cant seem to figure out the proper syntax for writing this. Im guessing GetRField is involved. Can anyone help with an example?
  10. Thanks Pat, I was just researching how to pass my Vectorscript variables into the python code. I will take a look, thanks for the heads up on it having to be a DynArray!
  11. Thanks Pat, that works great. One question, is there a way to make the file path contain variables? I get an error when I try. here is my method for finding the filepath to insure it exist before populating the dialog: fileName:=Concat('C:\Users\Eric\AppData\Roaming\Nemetschek\Vectorworks\2014\Stud Patterns\',FileCode,Ext,'.txt'); GetFileInfo(fileName, fullReadPath, fullWritePath, readFileExists, writeFileExists, locked, hasReadPermission, hasWritePermission, hasFolderPermission);
  12. I was wondering if there is a way to delete a text file (.txt) using a script. I have various hole pattern files saved per a height code and a number saved to multiple text files (93AA-1.txt) which are being read to populate a dialog list browser and using the Read procedure. 93AA-1.txt has 20 parameters to populate line 1 of the list, 93AA-2.txt populates line 2 and so on for a limit of 9. If the user wants to delete one of the patterns, I was hoping to delete the file to show the correct pattern list. I tried to do all of the patterns in a single text file (ReadLn) but was unsuccessful in getting the pointer to read the correct line. Any thoughts or help would be appreciated. Thanks.
  13. Thanks everyone. I will test these examples. You guys are great!
  14. Thanks everyone. I will test these examples. You guys are great!

 

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