Jump to content

sandertb

Member
  • Posts

    32
  • Joined

  • Last visited

Everything posted by sandertb

  1. Thanks for the reply! I am actually looking for a way to do this using python, would you know how to do this?
  2. Hi all, Does anyone know if it is possible to combine two nurbs curves into one, when the endpoint of one curve equals the startpoint of the other curve? Many thanks!
  3. Hi All, I'm running into a problem with the Ayrton Huracan-X Lighting device. Whenever I try to export a DWG (Top view) that contains this lighting device, Vectorworks will freeze. I have tried it with multiple files. Does anybody have the same issue with this lighting device, or could my Vectorworks library be corrupt? I am running VWX 2023 SP7 on macOS Ventura 13.3.1 Many thanks!
  4. @Marissa Farrell Thank you so much, this works like a charm!!!
  5. @Marissa Farrell I have minimalized my code so that it only contains the import parts for this issue, and it's attached below. Thanks for helping out! vwx_forum_bamboo.vwx Bamboo Tool VWX FORUM.vso
  6. Hey everyone, I am currently building a tool that creates an Extrude along a path and attaches a texture to this. However, on some sides of the extrude the texture is rotated 90 degrees, while on others it has the correct rotation. def create3DLine(objectHand, path): vs.RectangleN( 0,0,1,0, 1, params().bambooHeight) profile = vs.LNewObj() offsetPath = vs.OffsetPolyN(vs.CreateDuplicateObjN(path, objectHand, True), offset3D, False) vs.SetPlanarRefIDToGround(offsetPath) offsetNurbs = vs.ConvertToNURBS(offsetPath, False) extrude = vs.ExtrudeAlongPath(offsetNurbs, profile) vs.DelObject(profile) texPartID = 3 texLayerID = 0 texture = vs.Name2Index("Bamboo Prop Texture") vs.SetTextureRefN(extrude, texture , texPartID, texLayerID) Does anybody know how to fix this?
  7. Good to hear it has calmed down @_James. Do you have access to version history when you select the file in Chrome?
  8. Hi all, Ever since the introduction of Apple's new File Provider we have been having lots of issues with Google Drive in our organization. New files were overwritten by old files, multiple file versions were created and version history disappeared among other things. I have been in touch with Google for quite a while, and they finally claim they have fully resolved the issue. The issue regarding version history however still exists. When you save a .vwx file, it seems that Vectorworks is first deleting the old version of that file, then saves a .swap file, and finally renames this .swap file to a .vwx file. So the original file is never overwritten but it actually gets removed, thus losing version history. This never seemed to be an issue with the old version of Google Drive, but with Apple's new file provider it is. I am now wondering: Is this an issue that is related to Vectorworks and its process regarding file saving, or is this still an issue due to Apple's new File Provider? And is there anybody else still suffering from issues with Google Drive?
  9. I managed to get it working! Thanks for all the information, you guys are amazing!
  10. Thanks Pat! This is quite a nice workaround, however I dont see yet how this would work in my situation. In our symbols text can be linked to two different fields, and I need to know which field it was linked to before. Am I missing something in the script?
  11. @JBenghiatThankyou, I actually approached it with vs.BuildResourceList() and this seems to work too! Right now everything works aside from working with linked text. Currently I have this: for symbol in symbols: obj = vs.FInGroup(symbol) while obj != None: # Try if obj is Text and is linked to record if (vs.GetObjectVariableBoolean(obj, 680)): vs.AlrtDialog(vs.GetObjectVariableBoolean(obj, 680)) vs.AlrtDialog(vs.GetObjectVariableInt(obj, 1350)) vs.AlrtDialog(vs.GetObjectVariableInt(obj, 1351)) obj = vs.NextObj(obj) However, object variables 1350 and 1351 both return '0'. Am I using the variables wrong?
  12. Thanks for the quick responses! To elaborate, the old format consists of 8 fields such as product, brand, weight, power consumption, weight and location. As we have a custom legend tool that can translate symbol names to dutch, we would like to rename the product field to Product [ENG] without removing the values that currently exist, and add a new product [NL] field. Fields such as weight and power consumption are rarely used, and therefore we have decided to remove these fields alltogether. The location field is usually linked to text, and we would like again like to rename this field without removing the text links. I'll try the brute-force solution this week, and I'll keep you guys posted if this works. Regarding iterating over all text objects in symbols, I assume this only goes for symbol definitions right? Many thanks!
  13. Hi All, I want to update a record that exists across multiple libraries and drawings using a script. However, I noticed that no functions exist for either renaming a record field or deleting a record field. Are there any workaround for this? I do not want to attach a new record and remove the old one is because some symbols have text that is linked to a record, and as far I can tell this link will be removed when removing the old record. Does anybody have a suggestion on how to approach this challenge? Thanks!
  14. I left that line in by accident, my code is kind of a mess right now as I'm trying a lot of things in desparation 😅 The same goes for the last line containing 'h1 = vs.FInGroup(symbol)
  15. Hi guys, I've run into an issue where symbols that themselves consist of multiple symbols and/or locus points are not converted properly to a 2d symbol. I've tried converting these symbols into groups, and then calling the delete3d function again, but this does not seem to work as expected. h1 = vs.FInGroup(symbol) while h1 != None: if vs.GetObjectVariableBoolean(h1,1160) == False: h2 = h1 h1 = vs.NextObj(h1) sType = vs.GetTypeN(h2) isSymbol = sType == 15 or sType == 16 or sType == 11 or sType == 86 vs.DelObject(h2) if isSymbol: prevObj = vs.PrevObj(h2) vs.SymbolToGroup(h2, 1) toMessage.append("symbol to group" + "\n") delete3dGeometry(vs.NextObj(prevObj)) else: vs.DelObject(h2) else: h1 = vs.NextObj(h1)h1 = vs.FInGroup(symbol) Does anybody have a clue what I should do differently?
  16. Thanks so much @MullinRJ @Jesse Cogswell, you gave me a lot more info then expected. I'm testing the first version in Python as we speak, and it seems to work great so far! Me and my colleagues will never have to remove our custom 3d symbol components by hand anymore when we need to share a file. This is gonna save loads and loads and loads of time, I can't thank you enough!
  17. Hi All, I'm looking for a way to delete the 3D components of a symbol using Python (I do not want to delete the 2D components however). Does anybody know what the best approach would be to do this? Thanks!
  18. Thanks so much @PatW, "Purge Items" worked!
  19. Hi, Currently I am building a tool to reorganize and clean up a vwx file, and im looking to run the Purge command through Python. I've tried using vs.DoMenuTextByName('Purge', 0), but this does not seem to work. Does anybody know how to run the Purge function with python? Thanks!
  20. Hi Joshua, I finally had some time to come back to this tool, hence my late reply. I set the property when the eventcode == kObjOnInitXProperties, but unfortunately this did not seem to work. Do you perhaps have any other clue? Many thanks!
  21. Hi all, currently I'm working on a custom legend tool, and so far it has been working pretty well on Sheet Layers. However, when I insert the legend on a Design Layer, it's scaled way too small. So my question is: Is it possible to retrieve the type of layer on which the legend will be drawn, and it's corresponding scale as well?
  22. Hi all, This might be a stupid question, but I am wondering if it is possible to remove or disable the Degree field in the OIP of a 3D path object. I have created a tool that draws a symbols along the path, but if the degree in the OIP is edited the path is ruined, hence why I want to disable it. Does anybody have an idea?
  23. I've tried using BuildResourceListN as well as straight up calling CopySymbol with the following path which points to the workgroup folder: ~/Google Drive/Shared drives/VWX/Defaults/Festoon Strings/Festoon Strings.vwx I have not been able to find any resources using BuildResourceList, and no luck with CopySymbol either. I have also tried GetFolderPath as suggested, but I couldnt get this to work unfortunately, perhaps because of the location of the workgroup folder? Does anybody have a clue to what I could do?
  24. Hi All, I'm looking to import some symbols from our Workgroup Library into a drawing using a script. As the script will become available to everyone in our organization, i'd like to use a relative path, instead of absolute paths. I'm looking for something like this. However, copySymbol requires the path relative to the application folder, thus making it impossible to use this function (as far as I know). vs.CopySymbol('Workgroup/Libraries/Defaults/Festoon Strings.vwx', symbol_to_import) Does anybody know how to import a symbol from the workgroup library?
×
×
  • Create New...