Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Expose AmsAddress.RegularExpressionPattern #309

Open
rerpha opened this issue Feb 7, 2022 · 2 comments
Open

Feature: Expose AmsAddress.RegularExpressionPattern #309

rerpha opened this issue Feb 7, 2022 · 2 comments

Comments

@rerpha
Copy link

rerpha commented Feb 7, 2022

I would like to validate my AMS addresses against https://infosys.beckhoff.com/english.php?content=../content/1033/tc3_adsnetref/7313118347.html&id= and use pyads for it rather than copy it in and modify to work in python. Perhaps it could live in constants?

@rerpha rerpha changed the title Expose AmsAddress.RegularExpressionPattern Feature: Expose AmsAddress.RegularExpressionPattern Feb 7, 2022
@RobertoRoos
Copy link
Contributor

The netid object currently throws a ValueError when the net ID is not valid, when creating a Connection for instance. This is not based on a regex exactly, but a check for 5 periods and whether each group is numeric.

So you could try ... catch in your application.

I don't think we need to expose a regex like this.

@rerpha
Copy link
Author

rerpha commented Oct 13, 2022

my use case was offline validating, rather than creating a connection, and I was thinking as pyads is effectively a DLL wrapper/abstraction it might be handy to have it included in constants

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants