Jump to content

JBenghiat

Member
  • Content Count

    847
  • Joined

  • Last visited

Everything posted by JBenghiat

  1. JBenghiat

    Parellipsphere 170 not in Fixture Library?

    This is what many of us used pre-internet: Photometrics Handbook https://www.amazon.com/dp/0911747370/ref=cm_sw_r_cp_api_i_WTngCb8NAC1N9
  2. JBenghiat

    Parellipsphere 170 not in Fixture Library?

    Last time I used one was in the 90's, and the theater had trouble sourcing the EGJ lamps, so when we had a burn out it would go out of inventory. They're in my Photometrics Handbook, p. 348, Electro Controls Model No. 7367A, with the dimensions 25 11/16 x 15 ½ x 26 5/16. Weight 22.5 lbs (I remember the body being cast steel). The plot still opens in 2019! I just used the generic axial zoom ERS symbol, which in 3D looks like this:
  3. JBenghiat

    Function reference

    If you're looking to develop your own parametric object, start with the templates in the SDK. Because plug-ins are based on a COM model, creating a new PIO isn't as easy as just deriving a class. Don't consult the PDF — it's very out of date. The VW…Obj classes are wrappers for various object types and consolidate the various ways to create and modify an object. You're not going to find an external reference document for any of these, but while the header files for these don't have a lot of comments, I think the member function and argument names are fairly descriptive. Also make sure to look at parent classes, in this case VWGroupObj and VWObject.
  4. JBenghiat

    Change active document

    That could be problematic for a number of reasons — if you can accomplish what you want with references or file sharing, that would be the way to go. Also, resources in other files are accessible without opening the other file, and you can export a resource back to the original file with the SDK, so if you structure your files to use symbols, that could be a way to accomplish what you need.
  5. JBenghiat

    Function reference

    http://developer.vectorworks.net/index.php/VCOM:Class_Reference though some of it is outdated and not all functions are listed. Examining the include files and looking at code comments will give you the most information.
  6. JBenghiat

    Lighting Instrument Removes Global Lighting

    As you noticed, the ambient light really just raises the black point in the drawing, so not always ideal. Turning on ambient occlusion can enhance the look significantly. The behavior of the global light has been this way for years, and may even be a necessity of OpenGL rendering, so this probably won't change any time soon. I recommend setting up your work lights either as a symbol that you can easily drop in from your favorites library or a layer that you can import from a library file. The advantage to having the lights in their own layer is that you can quickly toggle them on and off with the Nav palette instead of going to the Visualization palette. A shadowless directional light at 45/45 is going to have an almost identical effect to the global light, with the exception that the global light always comes from over your left shoulder regardless of the view orientation.
  7. JBenghiat

    vs.SetResourceTags(handle, tags)

    In Python, the function wants a tuple, which is what you found in your test. vs.SetResourceTags(s, ('Tag1','Tag2')) https://www.tutorialspoint.com/python/python_tuples.htm
  8. JBenghiat

    Lighting Instrument Removes Global Lighting

    Any time you add a render light or object creating a render light (like a lighting device), Vectorworks assumes you are lighting with intention and turns off the virtual worklight. If you want more general light in the scene, you have two strategies. One is to add in some render lights (in the Visualization tool set). I like using one or two directional lights with shadows turned off. You can also edit the lighting options from the View menu, and increase the amount of ambient light in the scene.
  9. JBenghiat

    Text Along Path

    Text Along Path is a plug-in object, so to create one in VS, you use a CreateCustomObject call, not DoMenuText: CreateCustomObjectPath('TextAlongPath', handleToPath, handleToText); To set parameter values, you use SetRField(). The available parameters for this object are: Text Size Text Type As Height Above Path Rot About Path
  10. JBenghiat

    Text Along Path

    The resulting object is a PIO. Inspect the field names with the plug-in manager. I suspect that the text goes in the profile group and the path in the path group.
  11. You should also check that ExtendedGroups is indeed a list of handles. You originally mentioned using ForEachObject, which doesn’t implicitly generate a list, so there is a chance for error there. Another way to skin the cat without changing the active layer: create a new group set the group to the layer of the existing group with SetParent() set the class of the new group set the parent of the old group to the new group ungroup the old group with HUngroup()
  12. JBenghiat

    Undo not working with Lighting Instruments

    I'm not seeing this at all, so the issue might be more specific to your files or configuration. Also, undo errors can trickle down to future actions, so try duplicate and undo on a newly opened file. If that works, the undo bug is with another object. When you submit the bug, include your user logs and indicate the date and time, including timezone, to the best of your recollection when you first encountered the undo issue. If you experience the undo issue even in newly opened files, you can try creating a new user date folder via Vectorworks settings>User Folder, choosing a folder, and creating a new one via the explorer dialog. Also, you should try updating to 2019SP2, which released last week.
  13. I don’t think I’ve ever encountered this, but if Layer() is behaving as you describe, I think it’s a bug. Are you modifying objects via the script, or selecting them for user interaction? If the former, just make sure you’re using handle-based functions, and the layer doesn’t need to be active. And the snarky answer would be, this is another good reason to always rename layers to something specific 😏
  14. JBenghiat

    GetMouse live update while running script

    You could try updating the mode bar message http://developer.vectorworks.net/index.php/VS:SetModeString, but using the floating data bar and setting a datum (g key) may accomplish what you want.
  15. JBenghiat

    Tracking PIO movement

    You can do it with object states — there is a vsoStateGet call for moving and one for rotating objects (see Beam Draw as an example). This gets trickier if the PIO is also rotated and you should decide how you want to handle mirroring and duplicating.
  16. JBenghiat

    [C++] Unique Identifier for Objects

    Objects in VW do have a UUID, but only recently— starting in 2017 or 2018. The SDK has routines to read and write the UUID. You are correct that you shouldn’t rely on handles, as they are just addresses and don’t persist among sessions, and even within a session a handle can be re-assigned if an object is deleted. If you need an identifier for database purposes, you need to write to the object’s name. The name is unique by definition and indexed, so access is fast. You can come up with your own indexing scheme, or there is also a class for generating a UUID.
  17. JBenghiat

    Rename objects

    Not every function returns a handle — see the the function reference to check for return values. http://developer.vectorworks.net/index.php/VS:Function_Reference Most older functions, like Poly() do not. In those cases, get a handle to the last created object with: vs.LNewObj()
  18. JBenghiat

    Pausing menu for user interaction

    I'm trying to get a menu command to, based on a dialog choice, pause for user interaction in the drawing. I'm successfully calling RunTempTool(), but while the tool initializes immediately, the tool doesn't run until after the menu's DoInterface event completes. Is there a way to either tell the menu to wait until the tool has completed or the tool to pause other actions until the tool is complete? I suppose I could move the end of the menu call into a function that the tool could also call on completion, but there would be a lot of data to pass to the function when I only want to retrieve a point location and an angle.
  19. JBenghiat

    OpenGL update after modifying texture

    Is there a way to get OpenGL to reflect an edit made to a shader record? Currently, changes apply as expected to Renderworks, but for OpenGL, I need to open OpenGL settings and change Detail, Use colors, or Use textures and OpenGL resets. Changing render modes doesn't make a difference — OpenGL will read the previous texture definition until I toggle a setting. So far I've tried: objTexture.ResetObject(); objTexture.UpdateThumbnailPreview(); NotifyAnyStuff notification(kNotifyMaterialChange); gSDK->Kludge(kKludgeNotifyAny, &notification, nil); gSDK->RefreshRenderingForSelectedObjects();
  20. Looks like no, script palettes have to be at the root.
  21. JBenghiat

    Length of Hanging Position

    Yes — iterate through the contained objects, determine the type, cumulatively add the object’s length field (the field name depends on the PIO type)
  22. JBenghiat

    Lighting instrument candlepower data field

    Peak Candella in will give you foot-candles out. Lumens takes into account both intensity and distribution, so isn't as applicable to a simple cone-spread calculation.
  23. JBenghiat

    set active a rectangle

    Three modifications that should help: Don’t forget the parentheses in vs.DSelectAll() Instead of using the arbitrary x to govern the loop, use: while OBJECTO != 0: This will both ensure the script loops through all objects and prevent error if the number of objects is less than 10. Technically, the check should be OBJECTO != vs.Handle(0) vs.GetObject() returns the handle to a named object and should take a string as its parameter. What you want is: vs.SetSelect(OBJECTO)
  24. JBenghiat

    Updating Plugin Pop-Up Choices

    If you’re just looking to modify parameter options, there’s not really a way to do this. If your script is event enabled, you can use the WidgetPrep event to fill menus based on code as opposed to the predefined list. In your case, you can read values from a file. If you’re not currently using event enabled scripts, you are opening a proverbial can of worms, but you can greatly expand your available functionality. I believe the archive has some posts to get you started.
  25. JBenghiat

    LED Striplight Question

    Are you looking to track in paperwork, incorporate in Renderworks Renderings, or do actual revisualization in Vision or other pre-viz software (or all of the above)?

 

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.

×