DomC Posted October 21, 2023 Share Posted October 21, 2023 (edited) Hello I have a Vectorscript tool (not Event driven 2024). This tool rund a python module. The tool is working so far. code of the tool PROCEDURE ClickCallback; VAR x1, y1 : REAL; path : STRING; BEGIN SetCursor(LgCrossC); GetPt(x1, y1); PythonExecute('import dev.tool.mod.poly2PIO'); END; RUN( ClickCallback ); the module poly2PIO runs this code: import vs import os #vs.SetPref(412, True) #turn off caching #vs.Message(str(dir(vs))) with open(os.path.expanduser('~') +'/file_vst.txt', "w", encoding='utf-8') as f: f.write('\r'.join(dir(vs))) # error here isOnLine undefined method isOnLine = vs.PtOnLine((0,0), (-10, 0), (10, 0), 0.00001) everything and also vs.PtOnLine() is working. If i use that tool. But then, if i run run another vso (Event Enabled path object) it seems that the vst does not have the same vs-function anymore as before. Also if i use a standard vso (Script Based like the Rolling Stairs) the vs class in my vst do not contains the same methods anymore. import vs #from datetime import datetime import json import math import copy #import uuid import os import base64 import time #import urllib.request import code.common.controler as controler #vs.SetPref(412, False) # turn off caching with open(os.path.expanduser('~') +'/file_vso.txt', "w", encoding='utf-8') as f: f.write('\r'.join(dir(vs))) The functions in the vst does not work anymore. Also other vst's have the same issues now. The special thin i do is, that i run a pascal script and call a python after i click in the drawing. For further debug i write a text file with dir(vs) which lists all methods of the vs class. If i then compare the two files, i can see, that the dump written from file_vst.txt has much less methods available (left) as the file dumped from the vso? Somebody knows if this is a normal limitation or if it is worth for further diving in? I think not many devs wrapps a pascal around a python script so maybe this is a normal limitation that the methods freezed on a specific version or it is just a bug? It looks some-like, that methods after 2014 are not included now for my vst. Anybody knows what could going on? Here a screenshot from the method list compared with diff Merge Edited October 21, 2023 by DomC Quote Link to comment
DomC Posted October 21, 2023 Author Share Posted October 21, 2023 Must be specific an issue of my vso 🤔 I will STF (Search Till Found) Quote Link to comment
DomC Posted October 21, 2023 Author Share Posted October 21, 2023 I would say maybe a rookie error: #allowed >> produces no errors caching is off vs.SetPref(412, True) # turn off caching #don't do that >> seems to breaks the vs modul or ignore newer methods vs.SetPref(412, False) # turn off caching #allowed >> produces no errors caching is on #vs.SetPref(412, True) # turn off caching 1 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.