

Isaac Harned
Member
Forum Replies Created
-
Isaac Harned
MemberJanuary 4, 2023 at 5:21 pm in reply to: Visual Basic coding, Cells to Form Fields exportPoints: 8,204Rank: UC2 Brainery Purple Belt IIISorry for the delay, I seem to be creating a mountain of volunteer projects
.
Long story short, there is a customizable PDF form that I am creating (discussion is here: https://uchapter2.com/brainery/javascript/forum/topic/isaac-harned-here-for-forms-with-javascript/#post-135307), but not everyone in the office enjoys entering data on the PDF, which is understandable with the loss of keyboard flexibility. Once it’s in the field it is actually much more workable on ipad. As an option for the office, I am basically creating an input form.
+1 -
Points: 8,204Rank: UC2 Brainery Purple Belt III
Personally, for none other than comfort and accuracy, I love the Logi ergonomic (K860 keyboard, MX master 3S combo set). Both are Bluetooth capable and can switch between three devices. Mouse has a free spin wheel, so you can scroll through those long construction docs fast. Also has a side scroll wheel for a little more customization, couple extra buttons that can be customized for specific apps through the logi control panel. Keyboard clicks are smooth and quiet, yet have a solid almost mechanical click. Both are the most comfortable I have used yet, especially if you are at the station the entire work day.
+4 -
Isaac Harned
MemberOctober 27, 2022 at 5:12 pm in reply to: Isaac Harned – Here for forms with javascriptPoints: 8,204Rank: UC2 Brainery Purple Belt IIIForm is 100% working, not crashing, and is fast as all get out.
Attached is the working file, all code is placed inside of each dropdown.
Still a little confused on how the layers turn off their print setting, but the issue there is probably not code related.
Can’t thank you enough @lizlarsen , let me know what you think of the modifications I made for the individual dropdown code!
+2 -
Isaac Harned
MemberOctober 26, 2022 at 5:00 pm in reply to: Isaac Harned – Here for forms with javascriptPoints: 8,204Rank: UC2 Brainery Purple Belt IIIThe struggle continues, Children layers do not want to activate and deactivate.
I have tried switching tactics by using substrings to try and match some of these values, using the dash as a placeholder for values before and after. I attempt to grab before the dash to match with the parent, and after the dash to determine if the applicable “NumberOfTaps” dropdown signals the layer to be on or off. Nothing seems to be working on this front
Now also having an issue where layers print settings turn off when I change the initState, even though these are set to “Use Default”. tried submitting this issue to Bluebeam, however they tell me they cannot provide assistance with custom code. I guess I must find a way to change the print setting for the layer as well. I have tried modifying the code so that it ONLY targets the initState, but this does not help.
There is also now a third array of OCGs, this is to turn off all children of parents that have been deactivated. This one is also having the same difficulty as the other loop targeting children layers.
I am getting no specific errors, except for the console displaying a single “false”
x1var pcMask = /^[\d]{1,2}$/;
2//Tests for a digit in the first or second place, max string length
3var drop = this.getField("NumberOfTerminals").value;
4//Pulled from main drop-down
5var ocgOnArray = this.getOCGs();
67for (var i = 0; i < ocgOnArray.length; i++) {
8var fname = ocgOnArray[i].name;
9if (pcMask.test(fname) && ocgOnArray[i].name <= drop) {
10//Testing to isolate parents then less or equal to drop-down value
11ocgOnArray[i].state = true;
12ocgOnArray[i].initState = true;
13
14var gDropName = ("NumberOfTaps" + fname);
15//Name of smaller drop-down located on each parent layer, this variable does not want to populate and is an issue right now
16var pcMaskG = /[-]/;
17//All layers with dashes in name are children
18var grilleArray = this.getOCGs();
1920for (var iG = 0; iG < grilleArray.length; iG++) {
21var Gfname = grilleArray[iG].name;
22var GfnameSub = Gfname.substring(Gfname.indexOf('-') + 1);
23var GfnameGroup = Gfname.substring(Gfname.indexOf('-') - 1);
24//This was the most recent addition, hoping this substring callout is written correctly
25if (GfnameGroup==fname && pcMaskG.test(Gfname) && GfnameSub this.getField(gDropName).value) {
26//More than
27grilleArray[iG].state = false;
28grilleArray[iG].initState = false;
29}
30}
31}
32if (pcMask.test(fname) && ocgOnArray[i].name > drop) {
33//Wrapping up larger event, greater than
34ocgOnArray[i].state = false;
35ocgOnArray[i].initState = false;
36
37var grilleArrayOff = this.getOCGs();
38for (var iGO = 0; iGO < grilleArray.length; iGO++) {
39var GfnameOff = grilleArray[iGO].name;
40var GfnameGroupOff = GfnameOff.substring(GfnameOff.indexOf('-') - 1);
41if (GfnameGroupOff==fname && pcMaskG.test(GfnameOff)) {
42grilleArrayOff[iGO].state = false;
43grilleArrayOff[iGO].initState = false;
44}
45}
46}
47}
+1-
Isaac Harned
MemberOctober 26, 2022 at 7:02 pm in reply to: Isaac Harned – Here for forms with javascriptPoints: 8,204Rank: UC2 Brainery Purple Belt IIIHere is the latest file with the dropdown coded, sorry for not getting this in earlier
+1
-
-
Isaac Harned
MemberOctober 24, 2022 at 1:28 pm in reply to: Isaac Harned – Here for forms with javascriptPoints: 8,204Rank: UC2 Brainery Purple Belt IIIHere is the latest update to the code and the file. Major thanks to Liz for all the help!
+3 -
Isaac Harned
MemberNovember 15, 2022 at 9:21 am in reply to: Sharing Profiles – How to Make Sure Everyone has the Latest Updates?Points: 8,204Rank: UC2 Brainery Purple Belt IIIWorkflow could be to only allow those toolsets to be visible in the main working profile, then have a field profile to distribute with those tools not visible. I’m sure that’s already your workaround, but the best idea I had.
+3 -
Isaac Harned
MemberNovember 15, 2022 at 9:14 am in reply to: Sharing Profiles – How to Make Sure Everyone has the Latest Updates?Points: 8,204Rank: UC2 Brainery Purple Belt IIIAgreed this is the best option, just comes with one little caveat:
When exporting to a network location, Tool sets will be Locked, meaning that to make any changes to the set, user will basically have to unlock or check out the toolset. This can be annoying if you have a base set of tools that needs to change in minor ways along the process.
In our situation, our markups involve alot of visual properties that might need to be changed as we go through highlighting ductwork (i.e. colors that don’t mesh well together or are harder to see through when ductwork overlaps). Our process was originally to store the toolsets on the network, but I would see little random tools added to my chest, or little properties modified in my base tools. It would be great if we could assign permissions to them, but unfortunately, anyone you give access to will be able to unlock it.
What I do now is an export to local storage with dependencies into a folder. Then I manually move the folder to a shared location (it was not exported to the network location directly, so it will not have the lock). When setting up a new system, my training dashboard will instruct users how to manually copy that folder into their “AppData\Roaming\Bluebeam Software\Revu” \version folder, then they can open revu, import the profile, which will come with the tool chests. If a user wants to replace the toolset with the original, the folder will remain in the app data folder and can be dragged from the imported folder to the main “Revu/(version)” folder, and if there is an update to the Master file on the network, that toolset can be dragged directly to replace the same toolset. This eliminates the multistep re-import as long as they are named exactly the same.
+1 -
Isaac Harned
MemberOctober 31, 2022 at 8:45 am in reply to: Isaac Harned – Here for forms with javascriptPoints: 8,204Rank: UC2 Brainery Purple Belt IIILiz let me know that since this is not a pre-constructed regex, and the part being built to look for a digit is in quotations, JavaScript sees this as an escape character. In order to keep the expression intact, a second backslash was added to the digit search.
+1 -
Isaac Harned
MemberOctober 28, 2022 at 5:03 pm in reply to: Isaac Harned – Here for forms with javascriptPoints: 8,204Rank: UC2 Brainery Purple Belt IIIThe solution to this was simply the page size. 11 x 17 does not give the font enough of a lower size range to adjust. I had to tell Bluebeam support why this was happening, and that their text boxes DO adjust vertically AND horizontally. 36 x 24 works just fine.
+2 -
Isaac Harned
MemberOctober 28, 2022 at 9:11 am in reply to: Isaac Harned – Here for forms with javascriptPoints: 8,204Rank: UC2 Brainery Purple Belt IIIThank you Liz, super helpful!!!!!!
+1 -
Isaac Harned
MemberOctober 28, 2022 at 9:10 am in reply to: Isaac Harned – Here for forms with javascriptPoints: 8,204Rank: UC2 Brainery Purple Belt IIIAlso the line:
let childMask = new RegExp(“^” + tap + “-[\\d]{1,2}$”);
when I plug this into regex101, I get some weird search parameters. Never worked with the RegEx constructor, so please bear with me here =)
So if the previous tap variable only stores the number at the end of the string (Let’s say NumberOfTaps1), then this would be constructed as such:
/^1-[\\d]{1,2}$/
The part that is tripping me up is the double slashes I think, what does this do to the digit search?
+1 -
Isaac Harned
MemberOctober 28, 2022 at 8:57 am in reply to: Isaac Harned – Here for forms with javascriptPoints: 8,204Rank: UC2 Brainery Purple Belt IIISo in the local code, the line:
var tap = dropDownName.match(/\d{1,2}$/)
Does this only store what is matched? I.e. it looks at NumberOfTaps1, and only stores the “1” since it matches the search for 1 or 2 digits at the end of the string?
+1 -
Isaac Harned
MemberOctober 27, 2022 at 9:28 am in reply to: Isaac Harned – Here for forms with javascriptPoints: 8,204Rank: UC2 Brainery Purple Belt IIIOh my goodness Liz, you are amazing. It works for sure!!
I am still having the issue of the print setting for the layer toggling off and not back on, will test some more with that.
I am going to work today to modify all the individual dropdowns so that expressions can be applied to all, but this is so fantastic!!
Couple of small questions on the code:
1. The regex variable tapsMask, is this to filter out all layers that are not associated with the terminal and tap dropdowns (i.e. RACH layers)?
2. The double vertical bars, is this an OR statement? Seems like you are testing either the full fname OR the substring prior to the dash.
I have attached a screenshot of the code with some detailed notes for anyone hoping to follow along, please feel free to correct me @lizlarsen if I misinterpret anything! The file below is the latest with the new code loaded into dropdown. Sub dropdowns have not been 100% coded yet, but check out how fast this file moves now!!!
xxxxxxxxxx
381//NumberOfTerminals local code
2let drop = this.getField("NumberOfTerminals").value;
3
4//Tests for 1 or 2 digits at the beginning of the string, then looks for the end of the string, children will fail this test
5let parentMask = /^[\d]{1,2}$/;
6//Tests for 1 or 2 digits at the beginning of the string, then looks for a dash, then 1 or 2 digits, then the end
7let childMask = /^[\d]{1,2}-[\d]{1,2}$/;
8//Tests for 1 or 2 digits at the beginning of the string, then possibly (allowed to fail) a dash and 1 or 2 digits, then the end
9let tapsMask = /^\d{1,2}(-\d{1,2})?$/;
10//Creates an array of all layer names
11let layerList = this.getOCGs();
12
13//this loop will cycle through each layer name and perform the following for each
14for (let i = 0; i drop || fname.substring(0, fname.indexOf("-")) > drop)) {
15//if match, turn off layer
16layerList[i].state = false;
17layerList[i].initstate = false;
18//If parent fails the previous, and is NOT greater than
19} else if (parentMask.test(fname)) {
20//Turn it on
21layerList[i].state = true;
22layerList[i].initstate = true;
23//if it fails all previous and is a child layer, this works because all parent and children greater than the main are already off
24} else if (childMask.test(fname)) {
25//All the children whos group is equal or less than dropdown are going to pass what group they belong to
26var currentTap = fname.substring(0, fname.indexOf("-"));
27//Uses group name to grab the value of the associated dropdown, compares the substring after the dash. If the sub is greater than
28if (fname.substring(fname.indexOf("-") + 1) > this.getField("NumberOfTaps" + currentTap).value) {
29//Turn it off
30layerList[i].state = false;
31layerList[i].initstate = false;
32//otherwise, turn on
33} else {
34layerList[i].state = true;
35layerList[i].initstate = true;
36}
37}
38}
+1 -
Points: 8,204Rank: UC2 Brainery Purple Belt III
Thank you David, and I will keep you guys posted on the Autosize!
+1