Christiaan Posted December 13, 2022 Share Posted December 13, 2022 Has anybody played around with writing Python scripts for VW using ChatGPT? 2 Quote Link to comment
twk Posted December 13, 2022 Share Posted December 13, 2022 Some have in thread below: I have started using it, and I must say it is both cool and scary at the same time. Not too sure how to feel about it yet. It can write articles, even write full code, and can also write a song or a poem. Honestly still trying to wrap my head around its functionality and use-cases. Definitly something to keep an eye on. A screen recording below, obviously not everything is correct in the article, but I think it depends on the prompts you ask it as its based on a highly advanced Natural Language Training model. It is quite fun, in a dreading kind of way.lol 13.12.2022_22.15.05_REC.mp4 1 1 Quote Link to comment
Christiaan Posted December 13, 2022 Author Share Posted December 13, 2022 Doesn't seem like a big jump is needed until we ask it to design and document the built environment. 😬 1 Quote Link to comment
Pat Stanford Posted December 13, 2022 Share Posted December 13, 2022 In another thread someone asked ChatGPT to write a Python program for VW. The result looked very nice. But it used a huge number of functions that don't actually exist in VW or VW Pythonscript. But it could probably be a good outline for someone who then had the logic and just needs to implement the specific calls. 1 Quote Link to comment
Christiaan Posted December 14, 2022 Author Share Posted December 14, 2022 Does ChatGPT actually learn from user input? You could tell it to exclude certain functions and as long as you stay in that thread it would exclude them. But I wonder if there's any potential feedback into the algorithm based on that. Quote Link to comment
matteoluigi Posted December 14, 2022 Share Posted December 14, 2022 @elepp also has been talking about chatgpt, maybe. 19 hours ago, Pat Stanford said: But it used a huge number of functions that don't actually exist in VW or VW Pythonscript. afaik you can implement them in vw (although I still don't know how) 1 hour ago, Christiaan said: Does ChatGPT actually learn from user input? think so, in the beginning, when you log in for the first time, you got told not to write sensitive information, there... 1 Quote Link to comment
twk Posted December 14, 2022 Share Posted December 14, 2022 (edited) It remembers for that particular thread. Once you reset the thread, all previous interactions are deleted. However all your inputs are used to feedback into the overall AI's algorithm/learning. So releasing this into the wild by the developers is not for fun times, the AI is need of interactive data, which is why I believe they've released it. Edited December 14, 2022 by twk 1 Quote Link to comment
Christiaan Posted December 14, 2022 Author Share Posted December 14, 2022 Found this: https://help.openai.com/en/articles/6783457-chatgpt-faq Quote Who can view my conversations? As part of our commitment to safe and responsible AI, we review conversations to improve our systems and to ensure the content complies with our policies and safety requirements. Will you use my conversations for training? Yes. Your conversations may be reviewed by our AI trainers to improve our systems. 1 Quote Link to comment
Niels Timmer Posted December 20, 2022 Share Posted December 20, 2022 (edited) On 12/13/2022 at 7:16 PM, Pat Stanford said: In another thread someone asked ChatGPT to write a Python program for VW. The result looked very nice. But it used a huge number of functions that don't actually exist in VW or VW Pythonscript. But it could probably be a good outline for someone who then had the logic and just needs to implement the specific calls. I played around a bit with ChatGPT but I have the same experience: the AI writes code with a lot of functions that simply don't exist. I think it has to do with the very little documentation that is provided at developer.vectorworks.net. Edited December 20, 2022 by Niels Timmer Quote Link to comment
matteoluigi Posted December 20, 2022 Share Posted December 20, 2022 @Niels Timmer I would wonder, if chatgpt would really master such an comparatively insignificant code as Vectorscript (in comparison to much bigger and wider spreaded codes like Python, Java-/Javascript, C... Quote Link to comment
Popular Post twk Posted January 12, 2023 Popular Post Share Posted January 12, 2023 Heres another use case. I was trying to explain drainage design to a coworker and so I fired up ChatGPT, fed it Section 3 of the NZS3500 standard, asked it to summarise it and list out considerations for 3 bedroom residential house design, This is what it spat out: It basically took 20 pages of clauses tables and definitions, and summarised for us. <crazy> 5 Quote Link to comment
Christiaan Posted September 27, 2023 Author Share Posted September 27, 2023 Thought this was quite funny. This is the script ChatGPT gave me when I asked it for a script that would draw a smiley face. (spoiler alert, it doesn't provide a smiley face) import vs def draw_smiley_face(center_x, center_y, face_radius): """ Draw a smiley face in Vectorworks. Parameters: center_x (float): X-coordinate of the center of the face. center_y (float): Y-coordinate of the center of the face. face_radius (float): Radius of the face. """ # Draw the face vs.Oval(center_x - face_radius, center_y - face_radius, center_x + face_radius, center_y + face_radius) # Calculate eye positions and sizes based on face radius eye_radius = face_radius * 0.1 eye_offset_x = face_radius * 0.3 eye_offset_y = face_radius * 0.3 # Draw the left eye vs.Oval(center_x - eye_offset_x - eye_radius, center_y + eye_offset_y - eye_radius, center_x - eye_offset_x + eye_radius, center_y + eye_offset_y + eye_radius) # Draw the right eye vs.Oval(center_x + eye_offset_x - eye_radius, center_y + eye_offset_y - eye_radius, center_x + eye_offset_x + eye_radius, center_y + eye_offset_y + eye_radius) # Draw the mouth (using a 180-degree arc for simplicity) mouth_radius = face_radius * 0.4 vs.Arc(center_x - mouth_radius, center_y - eye_offset_y - mouth_radius/2, center_x + mouth_radius, center_y - eye_offset_y + mouth_radius/2, 0, 180) # Call the function to draw a smiley face at (0,0) with a face radius of 200 units draw_smiley_face(0, 0, 200) Quote Link to comment
Poot Posted October 20, 2023 Share Posted October 20, 2023 (edited) I've just started using VW again after a long pause and move to a new country, so I thought I would try asking GPT to write a script to help convert some text with heigh coordinates into a 3d loci. There is a marionette script here for that...but I had issues getting the nodes to visually scale properly ( the buttons are tiny if I bring them into my drawing) . Figured a script might work....so I just have to set up the layer structure in the script and try it out. In theory, GPT should be a huge asset to help programming noobs....and even for those who are handy....to really create some useful parametric features for things like 3d modelling. It will be interesting to see if it can also help automate translating different materials (e.g. converting landscape area styles to hardscape styles...since I basically only used landscape areas until recent upgrades to the hardscape functions) --------------------------- Procedure ConvertTextTo3DLoci; Var textHd, lociHd :Handle; textValue :Real; x, y, z :Real; Begin { Iterate through all 2D text objects } ForEachObjectInLayer(textHd, 11, 3) Do { Use appropriate criteria for 2D text objects } Begin { Get the text value as a real number } textValue := Str2Num(GetText(textHd)); { Get the X and Y position of the text } GetXandY(textHd, x, y); { Set Z value based on the text value } z := textValue; { Create a 3D Loci at the calculated X, Y, Z coordinates } lociHd := Locus(x, y, z); End; End; Run(ConvertTextTo3DLoci); Edited October 20, 2023 by Poot Quote Link to comment
Pat Stanford Posted October 20, 2023 Share Posted October 20, 2023 ChatGPT will lie to you all day about VectorScript/Python Script in VW. GetXandY is not a valid VS function. You can probably dig the information you need out of either GetBBox or GetTextOrientation. If the text contains anything other than digits you may also need to use SubString to extract only the digits. Probably other errors as well, but that is all the time I have right now. 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.