Zemtsov Posted April 15 Share Posted April 15 Hallo zusammen ich versuche schon seit ein paar Tagen Raum Objekte mit dem python-script anzulegen aber klappt gar nicht . Ich habe auf der Seite https://developer.vectorworks.net/index.php?title=Category:VS_Function_Reference:SpaceObjectCoreTools die Methods gefunden aber die mehr nicht in VS library mehr existieren.. Zum Beispiel: vs.Space_CreateSpace kann nicht gefunden werden Gibt es eine neue Dokumentation dazu, oder gibts eine neue Methode? 🥹 Quote Link to comment
Pat Stanford Posted Tuesday at 02:52 PM Share Posted Tuesday at 02:52 PM I don't have any information on the Python version. I tried what you did and got the same error message. My guess is that the capitalization is different than shown in the Reference Manual. The Vectorscript version does work, so the functionality exists. Procedure Test; VAR H1: Handle; BEGIN H1:=Space_CreateSpace(FSActLayer, 10'); End; Run(Test); Quote Link to comment
Zemtsov Posted Tuesday at 03:30 PM Author Share Posted Tuesday at 03:30 PM 36 minutes ago, Pat Stanford said: I don't have any information on the Python version. I tried what you did and got the same error message. My guess is that the capitalization is different than shown in the Reference Manual. The Vectorscript version does work, so the functionality exists. Procedure Test; VAR H1: Handle; BEGIN H1:=Space_CreateSpace(FSActLayer, 10'); End; Run(Test); Thank You! Which version of VectorWorks do you have then? I also tryed just few funktions and there was no result. Quote Link to comment
Pat Stanford Posted Tuesday at 03:34 PM Share Posted Tuesday at 03:34 PM I tested in VW2025 Update 4. Dashing to a meeting, but ask again if you still need more help. Quote Link to comment
Marionette Maven Marissa Farrell Posted Tuesday at 03:55 PM Marionette Maven Share Posted Tuesday at 03:55 PM Here's a quick file made in 2025 that demonstrates this working in Python. Please let me know if you need an earlier version. The script acts on the rectangle in the document, which I have named "poly" python Space_CreateSpace example_MFarrell.vwx Quote Link to comment
Pat Stanford Posted Tuesday at 05:49 PM Share Posted Tuesday at 05:49 PM I think I figured it out. At least partially. I was missing the parens at the end of the FSActLayer in my earlier tests. The following works for me in VW2025. vs.Space_CreateSpace(vs.FSActLayer(), 4) @Marissa Farrell Thank you for the help. Quote Link to comment
Marionette Maven Marissa Farrell Posted Wednesday at 11:29 AM Marionette Maven Share Posted Wednesday at 11:29 AM 17 hours ago, Pat Stanford said: I was missing the parens at the end of the FSActLayer in my earlier tests. That would do it! Python is strict about parentheses on functions. Quote Link to comment
Pat Stanford Posted Wednesday at 03:23 PM Share Posted Wednesday at 03:23 PM And CapitaliZation and white space. Drives me crazy!!! I thought I had escaped languages that cared about specific spacing when I finished my Fortran 77 class in 1987. I will take Begin/End and Semicolons any day over a program operating differently based on my accidentally putting in an extra space somewhere. 😂 My $0.02 2 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.