Jump to content

Patrick Winkler

Member
  • Posts

    225
  • Joined

  • Last visited

Everything posted by Patrick Winkler

  1. The Script caused an Dialog ('The Group is in a class. Do you really want to ungroup...') to show up. In order to prevent the dialog I just set the None class active at the begin of your function. SetClass would also change the class of all objs in the group! # for germany #CLASS_NONE = 'Keine' CLASS_NONE = 'None' vs.NameClass (CLASS_NONE)
  2. Hi Michael, this function sets all the attributes of the object by class: def setStyleByClass(h): """ Dem Object die Stil-Attribute der Klasse zuweisen """ # Füllstil vs.SetFPatByClass(h) # Füllfarbe vs.SetFillColorByClass(h) # Durchsichtigkeit vs.SetOpacityByClass(h) # Linienstil vs.SetLSByClass(h) # Linienstärke vs.SetLWByClass(h) # Stiftfarbe vs.SetPenColorByClass(h) # Textstil #vs.SetTextStyleByClass(h) # Marker vs.SetMarkerByClass(h) Is this what you need?
  3. thanks for your effort! Works great. (The Example from the 3rd post crashes.)
  4. The function SetObjBeginningMarker needs a value of the unit page inch. I've never heard of this unit and could not find anything about it on the internet. But after some experiments I'm pretty sure that one page inch is independet of the scale always one Inch on the paper. http://developer.vectorworks.net/index.php/VS:SetObjBeginningMarker size REAL The marker size in page inches. Is this function correct? def Inch_to_pageInch (inch, scale): # scale of the active layer return inch / scale
  5. Hello, the maps which my script imports are far away from the VW-origin. Therefore I want to call the menucommand: 'Center Drawing on internal origin'. I could not find a function for this in the VS Documentation and DoMenuByText does not recognize the command. Hope someone has a solution or easy alternative. thanks
  6. The copy-node seperates orignial from deulicate:
  7. Exactly - imagine a line from 0,0 to the parameter orientation. The angle of this line will be the angle of the rect.
  8. box = vs.GetBBox(obj) print (box) topL2D = box[0] topR2D = box[1] # Index out of range! botL2D = box[2] botR2D = box[3] http://developer.vectorworks.net/index.php/VS:GetBBox Hey Alan, the GetBBoc only provides two corners. You have to calculate the missing corners on you own.
  9. I can see nothng wrong. Are you actualy running python 3.6? import sys sys.version
  10. Hello willo, the Set-Class Node will do the job. You can find it in the attributes section
  11. Hello Chad, 1) You just have to make an if statement like this: if dropdown_value == 'a': output = Port_A_value elif dropdown_valu == 'B': output = Port_B_value Here's an example with all OIP controls: https://techboard.vectorworks.net/ubbthreads.php?ubb=showflat&Number=218725#Post218725 2) It's not possible to change any OIP-control value within the script execution.
  12. I'm not sure about it but checking the type for vs.HandleContainer () should work accurate. def isContainerObj (h): t = type (h) print (t) return not type (h) == type (vs.Handle(0)) h = vs.FSActLayer () print ( isContainerObj (h) ) Maybe some one can confirm this.
  13. This network creates a simple but highly customizable shelf. marionette_regal.vwx
  14. Hi Charles, 1. you can get the selected Sym-Instaces by the criterium: ((T=SYMBOL) & (SEL=TRUE)) then you have to get the Sym-Definitions from the Instances. You should use a set to store because you don't need any definition more than once in the list. 3. I'm pretty sure that GetFillBack() returns a 16Bit RGB Value. white = (65535, 65535, 65535) 4. Try it with vs.SetParent (locus, handle_of_the_symdefini)
  15. Hi Alan, the calculation of the strings with its beads is the bottleneck. Unfortunately this can't be turned of optionaly due the limitations of marionette. There is the option 'Show String beads' in the OIP which just controls if the beads are deleted at the end. 20 seconds sounds really long maybe it's time for a new computer Alternatively you can use the modificated version attached in this post which comes without strings.
  16. Hello, I'm working on a script which changes the units off all VWX files in a folder. The Problem is that the file opens to late when the script is already finished. I also tried it with the sleep () command. Is there a way to open a file and make it active within a function? def main (): # Get File succes, path = vs.GetFileN('', None, None) # Open File if get_OS_Code() == OS_WIN: # Windows command os.system('start' + path ) else: # Mac command os.system('open ' + path ) # Set Units Millimeters = 7 Centimeters = 8 Meters = 9 Kilometers = 10 vs.Units (Centimeters) # Save the File vs.DoMenuTextByName("Save", 0) # Close the File vs.DoMenuTextByName("Close", 0)
  17. Maybe in the next version The VWX in the top post is fixed now. Feel free to post your renderings or modifications of the network in this thread!
  18. I forgot to change the source of the control geometry. Update will follow later.
  19. Thanks. Do you get the error in orthogonal and 2D View?
  20. This Marionette Network generates vertical blinds. Nearly every part of the blinds can be modified by the parameters. Usage comments: - Put the Symbol 'Vertical Blind' into your drawing. - Now costumize it to your needs with the parameters in the object info palette: Total Length, Slat Height, Slat Width, Slat Angle and more (A Video will follow) - Finally you can define textures for parts of the slat by the generated classes: VerticalBlind-Slat VerticalBlind-Slat_Backing VerticalBlind-Rope VerticalBlind-Fixture VerticalBlind-String VerticalBlind-Beads Thanks to Dom for the PutByRefNode which made it a lot more easy. VerticalBlinds_V1_1.vwx.zip
  21. I don't think so. But VS is based on pascal which is not difficult to learn. Just take 20 Minutes to learn the syntax and you will understand most of the code examples. http://www.tutorialspoint.com/pascal/pascal_basic_syntax.htm
  22. Hi Alan, thanks for the help. The problem is not to get the camera moving on the camerapath but to set it's angle static. Imagine your driving parallel to a skyline and looking in a 90° angle out of the window.
  23. Hello, I wanted to create an video of a skyline with the camerapath tool. The Camera is placed in an angle of 90° to the Camerapath. The camera should keep this angle along the path but when the film is started it focuses on the start point. Follow object is disabled. Is there a option to change that behaviour?
  24. Hello, how can I check if a Symbol is referenced form another File? thanks
×
×
  • Create New...