How do I trigger getting the points in a vcPathStatement?

Hey, guys.

I’ve been working on the OLP part lately, and I’m really enjoying using the Inspector .NET add-on, but I have a question, for weld and search, which are vcPathStatements, Inspector can read the corresponding handles when I click on them, so how does this work in python, or specifically how do I replicate it in python 2.7 replicate? I’ve used vcSelectionmanager, and vcHelpers.Selection, but neither of them seems to be able to return the content, just like a light microscope can’t see molecules, at best I can get the “cellular structure” through Selection - the Statement, but I can’t get the corresponding handle when I click on it. Statement, but I can’t get the specific “molecules” inside it - Positions.

So the only solution is to replace “optical microscope”-python with “electron microscope”-C#? Or is there something else I can do?
Thanks in advance for any replies!:innocent:

Unfortunately I think there is no way to get “currently selected path statement frame” in Python 2 nor Python 3.

The access to selected objects is limited in the python APIs because the selection manager is on .NET side and it is possible to select objects that have no Python wrappers at all, i.e. they exist only on the .NET side or are native objects that just don’t have API coverage. The scope of objects that can be seen from the selection manager is bit better in Python 3 API, but won’t help with these frame objects.

The path statement frame objects (vcSchemaPositionFrame) are also special in general, because I think there aren’t persistent wrappers for them but are just created when needed. This is important to avoid memory overhead with up to millions of positions. Why the Python API doesn’t expose these as selected objects is likely related to this.

There is Python API to access the position frames if you know the statement, though.

1 Like

Hey, TSy.

Thank you for your reply and for the plugin, it’s my favorite featured plugin!:partying_face:

I know how to read the points and even their internal properties via the Python API, I’m more curious about reaching the action of clicking to get handles to those points, but it sounds like getting the vcSchemaPositionFrame type from the Python API by clicking to select the target can’t be done (at least for now).:joy:

Then again, fortunately I started using “electron microscopes” while I was posting, and I’ve read them in C# so far, and it looks like they all have a hash of 0, which fits in well with your comment about “create only when needed”.

Although the Python API can’t do it at the moment, at least I can understand why, so thanks a lot for this reply!:partying_face: