Jump to content

htranbos

Member
  • Posts

    29
  • Joined

  • Last visited

Everything posted by htranbos

  1. Design layer and it is set to 300 DPI. I zoomed in for the screenshot so you can see the jagged edges.
  2. Hi, I export a png rendering from Vectorworks 2023 with a transparent alpha channel. When I open it in photoshop and place it over a black gradient background. I can see jagged edges around the image. Does anyone know how to fix this? Thanks
  3. Thanks Pat and Raymond!! In that case, I think the documentation is a bit misleading. Instead of saying FSActLayer & LSActLayer return the first and last SELECTED objects. It should say FSActLayer & LSActLayer return the first and last drawn objects in the document. Is there a function to return selected objects in order, depending on how each object is selected on screen?
  4. Hello, I have 2 rectangles in my document. According to VS Python documentation: - Function FSActLayer returns a handle to the first selected object on the active layer. - Function LSActLayer returns a handle to the last selected object on the active layer When I select the left object first and the right object second, I receive the following alerts (as shown in attached screenshot) However, when I change the order of selection, by selecting the right object first and the left object second, I still receive the same alert. Wouldn't h1 & h2 order change dynamically based on whether it is selected first or last? I hope my question makes sense. Thank you! h1 = vs.FSActLayer() h2 = vs.LSActLayer() vs.AlrtDialog(h1) vs.AlrtDialog(h2)
  5. Hello all, I finally made it to work. In order for the above code to produce the correct result, you need to put each search criteria inside a () like below. crit_string_1 = "(SEL=TRUE) & (T=NURBSCURVE)"
  6. @twk I tried your suggestion placing criteria strings in variables. Each method works and produced no error. However, the output is still 0 instead of 1. For this test, I only have 1 Nurbs curve object in the scene and it is selected. The output of this script should be 1 instead of 0. I don't know why I can't get it to produce the correct result. myList = [] def sel(h): myList.append(h) crit_string_1 = '"SEL=TRUE" & "T=NURBSCURVE"' vs.ForEachObject(sel, crit_string_1) vs.AlrtDialog('Number of selected objects: {}'.format(len(myList)))
  7. Thanks @twk. I will try SEL and see if it the result is correct.
  8. I am able to make the script run without any error message.... but the output of this code should be 1 not 0. I don't know what I did wrong. myList = [] def sel(h): myList.append(h) vs.ForEachObject(sel, "(T='NURBSCURVE') & (VSEL=TRUE)") vs.AlrtDialog('Number of selected objects: {}'.format(len(myList)))
  9. It works if I break down the code like below: myList = [] def sel(h): myList.append(h) vs.ForEachObject(sel, "T=RECT") vs.ForEachObject(sel, "T=NURBSCURVE") vs.AlrtDialog('Number of selected objects: {}'.format(len(myList)))
  10. Hi Pat, I tried your suggestion and got the following error message. I didn't know about the criteria builder inside VS editor. This is awesome. Thank you!!
  11. I am making a simple python script to calculate the number of items added to a list. I have multiple rectangles and nurb curves in the scene. My script is below. According to VS:Search Criteria, multiple search criteria are created using the & operator to chain individual search criteria terms. However, I got the unsupported & operator error. Does anyone know how to perform multiple search criteria with Python script? Thanks fam! myList = [] def sel(h): myList.append(h) vs.ForEachObject(sel, "T=RECT" & "T=NURBSCURVE") vs.AlrtDialog('Number of selected objects: {}'.format(len(myList)))
  12. @JBenghiat Finally I am able to make it to work. Below is what I did: h = vs.FSActLayer() upi = vs.GetPrefReal(152) #Calculate unit per inch preference thickness = 25.4*upi*2 #Converting mm to in (1in = 25.4mm). This statement set thickness to 2" vs.CreateShell(h, thickness)
  13. @JBenghiat Thank you! I did not realize there is a separate forum for Python Scripting. I started to mess around with units per inch preference but haven't been able to make it to work. I will play around with it some more.
  14. I am writing a small script to create Shell Solid for a selected object. The current Document Settings units is in decimal inch. In the below script, I want to create a shell solid at 2" thickness. However, after running the script, the shell object thickness is at .079". Is there a way to convert REAL number to the correct unit in inches? h = vs.FSActLayer() vs.CreateShell(h, 2) Thanks
  15. @Kevin Allen Thanks Kevin. I just tried that, and it worked. It's not very intuitive but it does the job.
  16. I have a scene setup with multiple different cameras. Is there a way to use batch render in Vectorworks to export each camera view as an image in one go? Thanks!
  17. I cannot import from mtexture. I am using Vectorworks Fundamentals 2022 running on PC. Do you know why? Please see attached screenshot! Thanks.
  18. @Elite Exhibits Yes, I have that script already. It is super helpful.
  19. Wow! Thanks @Jesse Cogswell for a comprehensive response. I will give this a try.
  20. Is there a way to make Renderworks Texture automatically update when an old image file is override by a new image file. In some other software such as 3D Studio Max, texture maps are reference by default. This makes updating texture so much faster. I am just curious if you can do something similar in Vectorworks. Thanks,
  21. @Elite Exhibits Hi Peter, apparently, if I apply texture by dragging it from the resource browser, it works every time. Only when I try to change the texture via Object Info panel, that's when the problem occurs.
  22. @Kevin K Thanks for your response. It's not just a file. It happens to every file I have. I will try to capture it next time it happens and share it here. It's hard to do when it happens randomly.
  23. @Elite Exhibits I use Obj Info to select the texture to apply.
×
×
  • Create New...