VBA editor 'Imports'

VBA editor 'Imports'

Anonymous
Not applicable
763 Views
4 Replies
Message 1 of 5

VBA editor 'Imports'

Anonymous
Not applicable

Hi

 

I'm trying to import regular expressions into the local VBA project for a drawing document.

 

Putting the `Imports` statement ahead of the only `Sub` gives the following error:

 

meGVGMF_0-1669315066346.png

meGVGMF_3-1669315169047.png

 

This works in the rule editor, but not here.

 

Does anyone know what might be wrong or have any recommendations for what to try?

 

Thanks

0 Likes
764 Views
4 Replies
Replies (4)
Message 2 of 5

bradeneuropeArthur
Mentor
Mentor
Imports are not used in VBA!
Use add reference in the options!

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

Message 3 of 5

Anonymous
Not applicable

I knew I had to be missing something!

 

But is this where I add it?

 

meGVGMF_0-1669323460283.png

 

I've tried calling `System.Text.RegularExpressions.Regex.IsMatch()`, but it throws this error, that `.Text` isn't defined:

 

meGVGMF_1-1669323522600.png

 

I checked in that directory, and I have a System.Text.RegularExpressions.dll, but it says I can't add it as a reference..!

0 Likes
Message 4 of 5

bradeneuropeArthur
Mentor
Mentor
Does this help:
https://forum.uipath.com/t/cheatsheet-system-text-regularexpressions-regex/354895

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 5 of 5

Anonymous
Not applicable
I don't think so. I've been using regular expressions for almost 10 years. I just need to import the library, and that mentions it glancingly, and then moves on.
0 Likes