Jump to content

Justin Smith

Member
  • Content Count

    32
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Justin Smith

  • Rank
    Greenhorn

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Thanks Andrew and Miguel. I think I'm going to try Andrew's 1st suggestion, as I've done some similar scripts (working with symbols rather than plugins. )
  2. Curious if it's possible to Customize Spotlight (or any other included, standard) plugins that come with the Vectorworks suites, beyond just adding parameters. I see that it's possible to add additional parameters to the plugin records. I'm using this for instance with the LED Screens plugin. I've added a weight parameter and I can now calculate the weights of the screens directly in my worksheets. That's great, however, I'd like to extend my customized LED Screen plugin with actual code too! Currently the plugin only works with labels in the 2D View. In this case I'd like to create a 3D label that is added to the LED Screen in 3D, in addition to the standard functionality. Ideally I'd like to execute code after the rest of the plugin is done generating the geometry. It'd be great if this was part of the "Customized" plugin itself. However, if that's not possible, what about a second script that comes in after the fact and adds the 3D label to all of my LED plugins?? I guess that would work, I'd just have to iterate through the drawing and search for plugins records that match the LED Screen Record, correct? Would I be able to add my geometry inside the individual LED Screen PIO's, or would they have to be outside that PIO geometry? Thanks for any insight
  3. Hmm, possibly I've only used this to import Hybrid or 3D symbols. Let me look into this
  4. Still would love some insight here. The workflow I'm trying to accomplish is loading up images from disk automatically (based on a worksheet) and then creating a renderworks texture out of them. So far I can only figure out how to import the images as an image and can't convert them to a textureBitmap. Here's code (partially taken from a VW sample plugin). How or what could I do to instead of insert a image below insert a bitmapTexture?
  5. I updated my make unique code here. This only works for 3D symbols that are not inside of a group. https://gist.github.com/justinmilo/bbc1d64f28509737b601#file-makeunique-py
  6. Hmm was still a zip in my 2015 not a package.
  7. Here's my base functions that load up a symbol in the folder inside my plugins user folder called "JRSPlugins/JRSPythonProjectsLinked/VWXSymbols" I have a gist of this code here: https://gist.github.com/justinmilo/d85a048cb1ec4ce54270#file-jsbase-py ef JRSymbol(name, x, y, rotation): if not symbolExists(name): importSymbol(name) vs.Symbol(name, x, y, rotation) return vs.LNewObj() def importSymbol(id): aListID = 1 objectType = 16 #Symbol Index folderIndex = -2 # Plug-In Data Folder (negative means user folder) aListID, numOfItems = vs.BuildResourceList( objectType , folderIndex, "JRSPlugins/JRSPythonProjectsLinked/VWXSymbols") aString = "" for i in range(0, numOfItems): #myInt = vs.InsertImagePopupResource (dialog1, 4, aListID, i) name = vs.GetNameFromResourceList (aListID, i) if name == id: vs.ImportResourceToCurrentFile(aListID, i) def symbolExists (id): objectType = 16 #Symbol Index folderIndex = 0 # Current Document aListID, numOfItems = vs.BuildResourceList( objectType , folderIndex, "") for i in range(0, numOfItems): name = vs.GetNameFromResourceList (aListID, i) if name == id: return True return False def Symbol2D3D(SymString, X, Y, Z, Xr, Yr, Zr): JRSymbol (SymString, X, Y, Xr) vs.Move3DObj(vs.LNewObj(), 0, 0, Z)# to move an individual
  8. Ahh I should be using CreateThumbnailPopup not CreateControl Thanks to Klinzey for the tip
  9. Thanks guys. Klinzey. Totally right. I should be using CreateThumbnailPopup not CreateControl. Carry on!
  10. Questioning wether the issue i'm seeing is related to the same depreciated calls I'm having issues with vector script Modern Dialogs that work fine in 2014, but they are ?not working? in 2015. The dialog seems collapsed in 2015. I am wondering if it has something do to with the swap to cocoa. I'm running OS X Mavericks. screenshots below: https://www.dropbox.com/sh/0u0g3m6e4tpij75/AADsXpB8e4sFLPhazlCDvVtma?dl=0 The code is as follows: dialog1 = vs.CreateLayout('Select From this list', False, 'OK', '') vs.CreateStaticText( dialog1, kListBox1, "My test String", -1 ); vs.CreateControl(dialog1, 4, ImagePopup, 'displayName', 0) vs.SetFirstLayoutItem(dialog1, 4) vs.SetBelowItem(dialog1,4, kListBox1, 0, 0) myInt = vs.RunLayoutDialog(dialog1, dialog2_Handler)
  11. Jim, I'm having issues with vector script Modern Dialogs that work fine in 2014, but they are ?not working? in 2015. The dialog seems collapsed in 2015. I am wondering if it has something do to with the swap to cocoa. I'm running OS X Mavericks. screenshots below: https://www.dropbox.com/sh/0u0g3m6e4tpij75/AADsXpB8e4sFLPhazlCDvVtma?dl=0
  12. Hah! Why didn't someone mention CreateDuplicateObject! Thanks pat.
  13. In sketchup there is a "Make Unique" command in the context menu when you select a symbol, it works great for just what you are talking about. I'm working on making a similar menu command for Vectorworks. It's in python. I've added as a gist here if anyone's interested. https://gist.github.com/justinmilo/bbc1d64f28509737b601#file-makeunique-py BTW, why don't plugin's work as contextual menus?
  14. Pat, I've run into that issue myself. Is there a work around to get the actual objects width and height?
  15. Jim how about my favorite pet bug? Rendering of image bitmaps in OpenGL and Renderworks views. If you remember some times image bitmaps would render in 2014... and then sometimes they wouldn't. That fixed by chance? How about Vectorscript/python improvements. Anything been added or updated there?

 

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...