Jump to content


  • Posts

  • Joined

  • Last visited


7 Neutral


Personal Information

  • Occupation
    Design Director
  • Homepage
  • Hobbies
    Design, Music
  • Location
    United States

Recent Profile Visitors

1,064 profile views
  1. Just a hunch... but are you using an older workspace from a previous version? That could be the problem possibly..
  2. Try something like this... I do this stuff all the time... Hopefully that helps. SetPenColorByClass (Lnewobj ); SetClass ( Lnewobj , 'YourclassName' ); SetTextureRefN( Lnewobj, -1, 3, 0);
  3. Okay... I should of realized that Data Tag is a pio. Knowing that here is the concept and example. Hopefully useful to others... I plan to tweak this further, but it shows it can be done. See the attached file as well, the procedure is on a script palette with a VP to look at.. Thanks Dave Procedure Taggit; VAR viewportHandle,VPGroupH, VPObject:HANDLE; VPName:STRING; ObjName:STRING; PROCEDURE TagObj(H:HANDLE); CONST TagName = 'Code Tag'; LeaderAbove = 250mm; LeaderRight = 100mm; KVerticalOffset = 100mm; VAR DataTagH,ObjectH,VPObject :HANDLE; StyleBoo, TagBoo,AnnoBoo :Boolean; TagX, TagY,x1,y1,x2,y2, pX, pY:REAL; ObjectTop, ObjectTopInSpace, ObjectCenter, ObjectCenterInSpace, LeaderX, LeaderY :REAL; BEGIN GetBBox(H,x1,y1,x2,y2); ObjectTop:=y2; ObjectTopInSpace:= (y1); ObjectCenter:= (x2-x1)/2; ObjectCenterInSpace:= ((x2-x1) + x1) - ((x2-x1)/2); DataTagH := CreateCustomObjectN('Data Tag', 0 ,0 ,0, False); StyleBoo := SetPluginStyle(DataTagH,TagName); TagBoo := DT_AssociateWithObj(DataTagH,H); AnnoBoo:= AddVPAnnotationObject( viewportHandle, DataTagH); DataTagH:= Lnewobj; LeaderY:= ObjectTopInSpace+LeaderAbove; LeaderX:= ObjectCenterInSpace+LeaderRight; HMove(DataTagH, LeaderX, LeaderY ); {Leader above center of object } SetRField(DataTagH,'Data Tag','__RefOffsetX',Num2StrF(Round(ObjectCenter))); { Move horizontal } SetRField(DataTagH,'Data Tag','__RefOffsetY',Num2StrF((ObjectTopInSpace-KVerticalOffset))); { Moves vertical } SetRField(DataTagH,'Data Tag','Horizontal Position','Right'); { Default side the leader is placed } SetRField(DataTagH,'Data Tag','World-based','False'); ResetObject(DataTagH); END; BEGIN ViewportHandle := LSActLayer; If ViewportHandle=NIL THEN BEGIN AlrtDialog('Select a viewport!'); Sysbeep; END ELSE BEGIN VPGroupH:= GetVPGroup( viewportHandle,2); VPObject := FInGroup(VPGroupH); { The record criteria, class, etc to tag } ForEachObject(TagObj,((R IN ['Nimlok DB']) &(C='STEP-1') & (T<>LIGHT))); VPObject := NextObj(VPObject); UpdateVP( ViewportHandle); Redrawall; END; END; Run(Taggit); AutoDataTag.vwx
  4. Hey Guys... Here I am again looking for something that's probably not doable.. But I'm throwing it out there... either I'm not seeing a way to do it, or can't find the functions to data tag an object. What I'm thinking.... 1. Select a viewport. 2. Run the script..... 3. All objects within the selected viewport, assigned to a particular class, are automatically data tagged... *** when you have a bunch of viewports and everything in each needs a tag this would be a monster time saver *** Any insight.. ideas... is appreciated... Thanks Dave
  5. That seems very odd... I think you'll need to do a re-installed...
  6. Hi Trevor, Why don't you just use =COUNT in a database row cell?
  7. Hello- Yeah like most files, plugins are not backward compatible. As you're seeing, VW 2021 won't recognize the edited plugin file from 2023. The best you can do is keep the plugin file native to each version and create your scripts in an include file and use calls that work in the older version, but you'll still have to keep both plugin files up to date. Or only create your plugins in the older version, but use them in both versions of VWs. HTH
  8. Hi Juan @JuanP There was a person looking for the examples again today... and the download links are still broken... I've reported this twice... in the last few months and they're still not fixed...
  9. There's some examples of PIOs on this page... http://web.archive.org/web/20210413010835/https://www.vectorworks.net/support/custom/vscript/example Same as what's on the developer site, but those links are still broken...
  10. If I follow you correctly... you should be able to do what you want. From the menu command you'll need to tell the PIO what to do... something like... { Your Plugin Object for Title Block } MyTitleBlockHhandle := CreateCustomObject('Your title Block Plugin Object',0,0,0); SetRField(MyTitleBlockHhandle,'Show date', TheDate,'x/xx/xxxx'); SetRField(MyTitleBlockHhandle,'Start date', ThestartDate,'x/xx/xxxx'); HMove(MyTitleBlockHhandle, xOffset, yOffset ); HRotate(MyTitleBlockHhandle, centerX,centerY,rotationAngle );
  11. Looking for freelance designer with some experience in the exhibit industry to do some assemblies from a provided Vectorworks library using our components. Must be proficient on Vectorworks, be using Vectorworks 2023 Design Suite, and have a dropbox account. Please send me a private message with your experience and hourly rate etc... Thanks Dave
  12. Hey Thanks @JustinH that works 👍 and helps connect the dots... Much appreciated...
  13. Well after going down the rabbit 🐇 hole on this one .. I can't say I've made much progress on it. Some of the additional Selectors work, for example 1278 for ovRenderStyleEmitterBrightness, however nothing works for setting Indirect Lighting with any combination of selectors as Josh suggested. I then thought... Hmm what if I set a Render Style for the Background Render that best matches Shaded since it would have it's Lighting preset under Lighting Options for the Viewport. If you do a GET for it, when a Render Style is chosen it returns 15, however if you do a SET with 15, it sets it to Custom Renderworks instead 😆. Of course there doesn't seem to be a way to select which Render style you'd want anyhow, from what I can discern. I'd only have one in this particular template file. So for the time being it appears to be a no go. Hopefully in the future there will be a bit more clarity and object sectors for this. In my case.. it would really be helpful for automating assembly instructions.
  14. Much appreciated @JBenghiat I'll report my findings.... 🤠 thanks for passing this along....
  15. Hey Ray - @MullinRJ, Thanks for spending so much time on this, much appreciated. At least I got 50% of what I was hoping figured out 😜 Yeah, I think you're correct, If you can GET it.. you should be able to SET it... Quick summary and test script below... if helpful to anyone else.. and for later reference.. Have a great day! Dave Procedure SetSelectedVPLighting; CONST KIndirectLightIndex = 3; { 0, 5, 1, 2, 3 - For type in order } KAmbInfoONOFF = TRUE; { Boolean True/False } KAmbInfoBrightNess = 0.85; { Number in decimal for percentage } KAmbOcclusionONOFF = TRUE; { Boolean True/False } KAmbOcclusionStrength = 0.50; { Number in decimal for percentage } KAmbOcclusionSize = 100; { Real Number for size } VAR viewportHandle :HANDLE; BEGIN viewportHandle := LSActLayer; { Last selected object , Select a viewport } SetObjectVariableLongInt(viewportHandle,1269,KIndirectLightIndex); { Bug - runs but doesn't set - Indirect Lighting Index, 0, 5, 1, 2, 3 } SetObjectVariableBoolean(viewportHandle,1014,KAmbInfoONOFF); { Ambient Info On/Off } SetObjectVariableReal(viewportHandle,1015,KAmbInfoBrightNess); { Ambient Info Brightness } SetObjectVariableBoolean(viewportHandle,1302,KAmbOcclusionONOFF ); { Ambient Occlusion } { SetObjectVariableReal(viewportHandle,1303,KAmbOcclusionStrength); { Broken - fails - Ambient Occlusion Strength % } { SetObjectVariableReal(viewportHandle,1304,KAmbOcclusionSize); { Broken - fails - Ambient Occlusion Size } END; Run (SetSelectedVPLighting);
  • Create New...