Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by MaxStudio

  1. Does anyone know of any good tutorials for creating a wall sconces or pendant light fixtures that renders properly? Thank you.
  2. Hi Everyone, Using Vectorworks 2016 on Mac. Quick Question. I extruded an object from the right viewport. Unfortunately, now when I texture the object, the top and bottom are considered the "sides" and the sides are considered the "top & bottom". Is there a way to reorient the axis of an extruded object so that I can make the sides the top and bottom and the top and bottom the sides? Thanks!
  3. MaxStudio

    Muntin Bars

    I know there is probably an easy answer to this question but, I just can't seem to figure it out. I have a custom triple double-hung window that I have created with the Vectorworks window tool. The center window is 40" wide and the side windows are 18" wide. I want 3 vertical muntin bars in the center window and 1 vertical muntin bar in the side windows but, it seems I can only have one or the other. (Either 3 vertical bars in all windows or only 1 vertical bar in all windows). What am I missing? Thanks Derek
  4. I'm trying to create a box bay with a window. I've created the box bay using walls and offset the base of the walls to the appropriate height. unfortunately, once I offset the base of the box bay walls a hole remains in the main wall of the house. What is the best way to go about creating a box bay like this? Thanks, Derek
  5. I'll keep my Ho-Ho-Ho Hopes up
  6. It's interesting because it seems like it is a problem that has been plaguing the program for quite some time. I wonder if there is anyone at vectorworks working on a solution to this problem.
  7. I've also created a 3d tapered object and used the "Add 3d Object to Slab" menu item to attach the object to the slab. That did attach the 3d object to the slab but, then the horizontal lines of the slab became visible too. It's almost like the slab became part of the 3d object and inherited it's properties instead of the 3d object becoming part of the slab. Hi Boh, What layer do you put the Solid Chimney Object on? I was able to get it to work but, I had to do a little extra work. I will list my process below: I did what you said and created the Chimney as 1 solid object. I'm going to call this object "Chimney_Elevation_Object" I put Chimney_Elevation_Object on the design layer "Slab-1" (that allows me to show the chimney in elevation but, not on any of the plans because the Slab-1 layer is set to invisible on my plan views) I still needed the walls of the chimney to show in plan so I created a new class called "Wall-Chimney" I then went to the First Floor Walls design layer and created the walls for the wider portion of the chimney and put those walls on the Wall-Chimney class. I then went to the Second Floor Walls design layer and created the walls for the narrower portion of the chimney and also put those walls on the Wall-Chimney class. Finally, I set the visibility for the Wall-Chimney class to visible on the plans and invisible on the elevations. See Pictures 3,4 & 5 Below. Unfortunately, there is a little bit of double work that needs to be done to accomplish this outcome. In the future, if I change the chimney in plan, I will need to remember to also change the solid Chimney_Elevation_Object. I will also have to create some more classes for demo and new chimney walls. Thanks for your help and if anyone else has any further solutions I would love to hear. Derek
  8. Hello Everyone, I'm trying to create a chimney that tapers. (see picture 2) I've drawn the walls, which represent the wider portion, on the first floor and the walls, that represent the more narrow section, on the second floor. I need to create the transition piece between (see picture 1). I want the transition piece to perform much like a slab so that the horizontal lines are invisible when rendering Hidden line. My questions are: 1. What is the best way to go about creating this piece? 2. I could use a slab but, is there a way to taper a slab? 3. I tried creating a polygon, performed and extrude and tapered it. And while that got me the shape I was looking for it still has the horizontal lines in Hidden Line mode. Is there a way to hide the horizontal lines? Thanks Derek
  9. I have two questions. Once I make the xml file where do i save it? the same plugin folder that the vso file is in? also I've never encrypted a plugin using the EncryptVSPluginFilePath is there any documentation which explains this process? I wonder why there isn't just a button in the Plugin Manager that simply says "ENCRYPT PLUGIN"? ... I had to switch my workspace but found a pulldown for Encrypt Scripts but, it doesn't allow me to select a .vso file. I'm very confused on how to accomplish this encryption.
  10. I created a plugin object using python. The main code was pasted into the script editor via the plugin manager. I compiled the script and the plugin item works as it should. Now I would like to lock the script. I'm on a mac and recently made the jump from Vectorworks 2008 to 2016. In the past when creating a vector script I could lock it by holding down 'command' + 'option' + 'shift' + 'caps lock' (it was important that all external files had the extension .px) Now i'm in 2016 and scripting with Python. I only have 1 other file in addition to "import vs", which is, "import shapes" when i compile my script (shapes.py). It finds this file via the scripts options/environment paths. How do I go about locking or encrypting this plugin object? also, I do have a __init__.py file included in the folder that contains shapes.py
  11. Ok thanks Raymond I will try! Thank you Raymond that worked! I appreciate the response!
  12. I've eliminated the vs.GetCustomObjectInfo(objname,oh,rh,wh) and just used vs.SetParameterVisibility(handle, 'parametername', FALSE) I set the object handle to zero vs.SetParameterVisibility(0, 'parametername', FALSE) I want to use a pulldown to set the visibility to true: number=vs.Pnumber if number == "2": vs.SetParameterVisibility(0, 'parametername', True ) but I'm getting the following error: Error: Invalid callback function parameter type. Parameter index= 0 name=inPlugin File "<string>", line 38, in <module> File "<string>", line 1, in <module> below is the actual code: import vs import shapes number=vs.Pnumber shape01=vs.Pshape01 shape02=vs.Pshape02 shape03=vs.Pshape03 xstart=0 vs.SetParameterVisibility(0, 'shape01', False ) vs.SetParameterVisibility(0, 'shape02', False ) vs.SetParameterVisibility(0, 'shape03', False ) if number == "2": vs.SetParameterVisibility(0, 'shape01', True ) vs.SetParameterVisibility(0, 'shape02', True ) if number == "3": vs.SetParameterVisibility(0, 'shape01', True ) vs.SetParameterVisibility(0, 'shape02', True ) vs.SetParameterVisibility(0, 'shape03', True )
  13. I have not assigned a value to objname. I've created a plugin object and I need to reference and object handle to set the visibilities of the parameter. how do i acquire or assign these? I thought using the following: vs.GetCustomObjectInfo(objname,oh,rh,wh) would have acquired and assigned these for me
  14. I'm trying to set parameter visibility in the object info panel. In the old vector script I would retrieve the custom object information as follows: result:= GetCustomObjectInfo(objname,oh,rh,wh); I would then set the visibility of the parameter as follows: SetParameterVisibility(oh,'parametername',FALSE); In python I am trying to accomplish the same thing. I've tried the following: result = vs.GetCustomObjectInfo(objname,oh,rh,wh) and then I attempted to set the visibility as follows: vs.SetParameterVisibility(oh, 'parametername', FALSE) when i run the script I get the following error: NameError: name 'objname' is not defined Does anyone know how to accomplish this using best practice? Thanks, Derek
  15. Ok thanks guys, I downloaded PyCharm I will check it out
  16. In the past I have run into a problem where the scripting window limits the amount of code I can put in a plugin. That lead me to start using 'Includes" after which, I was no longer limited. The problem is that some of my codes end up being very long and I do not like scrolling through a ton of code just to find what I'm working on. For example, If I have a code that generates 10 types of doors. In the past I would generate variables for door width/height/wall thickness. (i would consider those to be global variables) All of the door types would use those variables. But not all of the doors would be the same. Some would be solid, some would be glass and some would be paneled. To create these individual door types I would have a set of Local Variables for each. In the past i would create a main include file that sets global attributes and draws global objects. When the user selected a door type the corresponding include file would load to draw the selected door. Having the separate "include" file would allow me to work on a simple code to generate each individual door type. I wouldn't need to work on one large file that includes all 10 doors. When the code was complete I would lock it within vectorworks so that it would run as a single plugin file. I'm having a little trouble understanding the best way to accomplish this with python. I'm not a paid programmer and Im learning as I go. I'm trying to get a better grip on python as we are moving from Vectorworks 2008 to 2016. That being said, I find it much easier to comprehend looking at small pieces of code rather than a monster.
  17. I like to deconstruct my larger more complicated scripts into smaller files. It helps me stay organized. I'm trying to get imported functions to use global variables that I have created but, it's not working the way I like and I'm not sure why. I have a main script that defines the global variables. The main script also imports demo.py and calls the function draw. The demo.py script is basically an if/else test. I've imported another file named shapes.py which has functions to draw shapes. -If the global variable 'w' is less than 6 call function myrectangle() from shapes.py -If the global variable 'w' is greater than 6 call function myoval() from shapes.py -if the global variable 'w' is equal to 6 print "Hello World" in a Alert Box. When i try to run i get: NameError: global name 'x' is not defined. I thought that if I had global variables defined in the main script i would be able to use them in the imported functions. Am I doing something wrong? main.py import vs import demo w=vs.PLineLength h=vs.PBoxWidth x = 0 y = 0 y = y-h/2 demo.draw() demo.py import vs import shapes def draw(): vs.PenSize(2); if w < 6: shapes.myrectangle() elif w > 6: shapes.myoval() elif w == 6: vs.AlrtDialog('Hello world.') shapes.py import vs def myrectangle(): vs.Rect(x,y, x+w,y+h) def myoval(): vs.Oval(x,y, x+w,y+h)
  18. First let me thank you for your response. Way back in high school I took pascal and early in college took C++ beyond that I'm self taught writing scripts mostly for vectorworks and a few other programs. So recently I was told by a sales rep that python would be the future for vectorworks. This has led me to this point where I'm attempting to get a grasp on python. Using the internet I'm trying to teach myself enough to get by and trying to keep my examples small so I don't attempt to take on too much at one time or overwhelm other forum users with an exorbitant amount of info. As for IDE, I use TextWrangler to write most of the scripts. I can run python in that but, I can't run anything written specifically fro Vectorworks. Vectorworks has been a pain to test the python code due to the fact that I have to restart it everytime I change a file i am importing. Unfortunately, at this stage I'm dealing with a lot of trial & error. (thus my quote in my signature) If you have any other near free solutions for IDE I would appreciate it. I really appreciate all your help. Thank You!
  19. ok changed all the vs.Message() to vs.AlrtDialog() At first I tried just replacing the vs.Message() with vs.AlrtDialog() and still only got one alert dialog saying hello world example.py import vs from test import myclass def plugin(): obj = myclass return obj.runme() plugin() def plugin2(): vs.AlrtDialog('Ive made it this far') plugin2() test.py import vs class myclass: def runme(): vs.AlrtDialog("hello world") It wasn't until I added the plugin2() that it gave me: hello world in one alert box and Ive made it this far in a second alert box but it didn't only run once... it ran 3 times! huh!? :eek:
  20. Python does work with single and double quotes. I've actually gotten the import to work. I have updated the example.py as follows: import vs from test import myclass def plugin(): obj = myclass return obj.runme() vs.Message("I've made it this far") plugin() test.py is as follows: import vs class myclass: def runme(): vs.Message("hello world") so at this point my code produces hello world but for some reason it does not finish the plugin function it seems to skip the vs.Message("I've made it this far") Any ideas why? maybe if I move the vs.Message after I call plugin()...
  21. Ok here's my latest issue: I added the Project folder /Macintosh HD/projects/project02 to the script options>environment paths In the project02 folder are 3 files: example.py test.py __init__.py example.py code: import vs from test import myclass def plugin(): obj=myclass() obj.runme() vs.Message("I've made it this far") plugin() test.py code: class myclass: def runme(self): vs.Message("hello world") I would expect the output to be: hello world I've made it this far but I only get: I've made it this far any ideas why it's not running the runme() from myclass()?
  22. ok seems i was able to get it to work i made a small change in example.py as follows: import sys sys.path.append('/Macintosh HD/projects/project01') from test import myclass I thought import test.myclass was another way of saying from test import myclass but I guess it had a problem with it. I notice when I import myclass it runs the runme def. I assumed that it would import the def but not run it immediately. I guess I was wrong.
  23. I'm playing around with importing into python. All my work is in a folder on my hard drive at the following location: /Macintosh HD/projects/project01 In the project01 folder are 3 files: example.py test.py _init_.py I'm attempting to import information from text.py into example.py test.py contains the following: class myclass: def runme(): print "hello world" example.py contains the following: import sys sys.path.insert(0, '/Macintosh HD/projects/project01') import test.myclass When I run my code it tells me ImportError: No module named myclass Any idea why this is happening? Am I going about this the wrong way?


7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114


© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

  • Create New...