Liz Larsen
Member
Forum Replies Created
-
Points: 5,215Rank: UC2 Brainery Purple Belt

JavaScript can insert pages from another file. Would you like to do something like that?
-
Points: 5,215Rank: UC2 Brainery Purple Belt

Outside of Sessions, I would agree that it’d be nice to be able to clear a status. But, if you’re not in a session, you could just delete and recreate the markup to effectively clear the status.
-
Points: 5,215Rank: UC2 Brainery Purple Belt

Nope! You can only change the status to some other status.
-
Points: 5,215Rank: UC2 Brainery Purple Belt

A huge limitation to JavaScript within Bluebeam is that it can’t manipulate markups.
It can manipulate form fields, along with other document properties (insert/delete pages, page labels, bookmarks, etc…)
With that limitation in mind, I’m not sure how I would solve this using JavaScript. Sorry 😕
-
Liz Larsen
MemberNovember 8, 2022 at 2:14 pm in reply to: Video – Debugging JavaScript for Bluebeam in a Digital DashboardPoints: 5,215Rank: UC2 Brainery Purple Belt
I had debated on how I wanted to do this particular video.
Did I want to figure it out off camera, then do a much more scripted video on how I fixed it? Or did I want to do it in real-time to show how I troubleshoot and problem-solve?
Obviously I went went with the latter. I figured “show, don’t tell” might work better. And it’ll make people feel better about their own silly mistakes. We all make them. Especially, I think, when writing code.
-
Points: 5,215Rank: UC2 Brainery Purple Belt

This is exactly one of the things I’m looking at.
With writing JavaScript in Bluebeam, there’s the eternal questions of:
- Does my code not work because I wrote it wrong?
- or
- Does my code not work because it’s not possible?
With such limited documentation available for what I’m doing, I have no idea if I should continue down some pathways in an attempt to fix my code, or if that will be a fruitless endevour.
-
Points: 5,215Rank: UC2 Brainery Purple Belt

-
Points: 5,215Rank: UC2 Brainery Purple Belt

Coincidentally, my newest video (debuting tomorrow!) goes over a dashboard that uses JavaScript to hide and show layers.
And you’ll see exactly why JavaScript was used here, rather than creating a bunch of similar pages.
(P.S. if anyone needs help adding JavaScript to their dashboards, come see me)
-
Points: 5,215Rank: UC2 Brainery Purple Belt

I’m still working on it. My optimism fades, though.
Any method I think of, there are security reasons for disabling JavaScripts ability to do it. Such as JavaScript being able to open folder leads to the possibility of inserting malicious code onto your computer.
Like, I get it. But at the same time I’m frustrated because I have it planned out in my head and it would be possible if not for security reasons. Ugh.
-
Liz Larsen
MemberOctober 31, 2022 at 6:41 pm in reply to: Isaac Harned – Here for forms with javascriptPoints: 5,215Rank: UC2 Brainery Purple Belt
Also 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?
You can’t plug that particular regular expression into regex101. That website is meant for only regular expressions, not for any other code (ie JavaScript).
The new RegExp(“string”) is JavaScript, therefore regex101 doesn’t know what to do with it.
new RegExp(“string”) allows you to take a string and let JavaScript know to turn it into a regular expression. Just like any other string, we can add variables.
var name = "Liz";
console.println("Hello, my name is " + name + ".");The code above will print “Hello, my name is Liz.” to the console. This is basically what we’re doing, except with a regular expression as the end result.
To answer your original question, we use the double slashes because new RegExp is a string and the \ is an escape character in JavaScript. To escape an escape character, we have to add an additional \. The first \ is the escape character, letting JavaScript know that the second \ is to be interpreted as a string character.
To test that this code works, I went to codepen.io. You can see in the attached photo how heavily I have to edit the global code to test the functionality. But it was enough proof of concept for me to know that the tap variable in my childMask regular expression was working.
I hope that makes sense.
-
Liz Larsen
MemberOctober 31, 2022 at 6:03 pm in reply to: Isaac Harned – Here for forms with javascriptPoints: 5,215Rank: UC2 Brainery Purple Belt
So 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?
Yes, you got it. The tap variable stores the number of taps for that particular terminal. (I always hope that I’m using the correct terminology for your PDF)
var dropDownName = event.target.name stores the name of the dropdown box
var tap = dropDownName.match(/\d{1,2}$/) stores the digit on the end of the dropDownName, thereby effectively finding the layer it’s on.
That tap variable is then passed to the global code, which turns the appropriate layers on or off.
-
Liz Larsen
MemberOctober 28, 2022 at 7:25 am in reply to: Sharing Profiles – How to Make Sure Everyone has the Latest Updates?Points: 5,215Rank: UC2 Brainery Purple Belt
I’d like an option to export a profile with only things I specify. Like when you export a CSV summary of markups, you can pick and choose what you want exported.
I’d like an “Export Profile” button and a dialog box pops up with checkboxes. Same with an “Import Profile” button. It’ll say “This profile contains custom toolbars, X number of toolchests, and custom statuses” with an option to import whichever you need.
-
Liz Larsen
MemberOctober 28, 2022 at 7:20 am in reply to: Sharing Profiles – How to Make Sure Everyone has the Latest Updates?Points: 5,215Rank: UC2 Brainery Purple Belt
Short answer: no.
Longer answer: The Toolchest root file itself does not care when the profile gets saved. The Toolchest file only gets updated when you click the lock, make a change, then click the lock again. This being said, if you’ve got users’ Toolchests pointed to a network drive, <i style=”font-weight: bold;”>make those Toolchest files read-only.
When the user saves their profile, the only thing about Toolchests that gets updated is which Toolchests are loaded and active, plus the path of those Toolchests.
And, if I got any of that wrong, someone please feel free to correct me.
-
Liz Larsen
MemberOctober 27, 2022 at 10:15 pm in reply to: Isaac Harned – Here for forms with javascriptPoints: 5,215Rank: UC2 Brainery Purple Belt
It would help if I actually attached the text files…. It’s late. I’m tired.
-
Liz Larsen
MemberOctober 27, 2022 at 10:00 pm in reply to: Isaac Harned – Here for forms with javascriptPoints: 5,215Rank: UC2 Brainery Purple Belt
YAAAASSSS! I got it. Man, nothing like the adrenaline rush of successful code at almost 11pm on a school night.
Ok, I wrote some code so that all your NumberOfTaps__ dropdowns will have the same code verbatim. No need to specify what terminal it is or manually update this in any way. See the attached local code text file.
Then, that dropdown code calls a global function that does all the work. See the attached global code.
This means that if you add more terminals in the future, there’s no manually updating the code. Just copy the local code into the dropdown, label your layers and form fields correctly, and the code takes care of the rest.