Jump to content

Julian Carr

Distributor
  • Content Count

    218
  • Joined

  • Last visited

Everything posted by Julian Carr

  1. There is no official way to do it, however if you used CreateImageControl2() to insert the image as the first item in the dialog, you could probably then use SetBelowItem() with a large negative Y value to place the next item over the image and subsequent items below that. You will need to create a VWR file to store the image, which is simply a zip file of the image or images (without a parent folder), which you then just change the file suffix from .zip to .vwr. If your zip/vwr file was called MyImages.vwr, and the image in there was called image1.png (use png images), then the call to place the image would be something like this: CreateImageControl2 (Dialog1, ItemID, 500, 400, 'MyImages/image1.png'); The VWR file lives in the Plug-ins folder and 500/400 is the pixel size you want the image to appear in the dialog. Just make sure to preserve the image proportions. For example, this would work if the actual image was 1000 x 800 pixels, or 1500 x 1200, etc.
  2. Thanks a lot Pat and Ray. I cobbled something together from what you sent.
  3. Anyone have a script handy that will export a list containing sheet layer names and numbers? TIA.
  4. I guess the first question is why does your PIO need to reset when the zoom level changes? Generally this should not be necessary. Ignoring that for the moment, if this were possible it could only work in an event enabled PIO using SetObjPropVS(). I don't have the full list at hand, but this is the function that allows PIOs to reset if there are layer scale or layer elevation changes, for example.
  5. I don't recall a script, but you can just select all the sheets in the Nav palette, right click, choose Edit, then change the DPI there. Only takes a few seconds.
  6. This works for me: Procedure T; VAR BeamHandle : HANDLE; BEGIN BeamHandle:=CreateCustomObjectN('Wide Flange - 3D',0,0,0,FALSE); SetRField(BeamHandle,'Wide Flange - 3D','__series_2', 'AISC (Metric)'); SetRField(BeamHandle,'Wide Flange - 3D','__size_2', 'W200 x 22.3'); SetRField(BeamHandle,'Wide Flange - 3D','Length', '3000mm'); SetRField(BeamHandle,'Wide Flange - 3D','__current_series', '2'); SetRField(BeamHandle,'Wide Flange - 3D','__current_size_2', 'W200 x 22.3'); Set3DRot(BeamHandle,0,45,0,0,0); ResetObject(BeamHandle); END; Run(T);
  7. This will at least explode the object for you: SymbolToGroup(FSActLayer, 1);
  8. Thanks Josh. I worked out another way to achieve the end goal.
  9. Anyone know if there is a way to delete or replace a record field from an existing record using VS? Thanks!
  10. Untested, but something like this should work... Procedure CheckSymbolExists; VAR gsSymNameCurrent : STRING; Function DoIt(h1 : HANDLE) : BOOLEAN; VAR sSymNameExist : STRING; BEGIN IF (h1 <> Nil) & (GetType(h1) = 16) THEN BEGIN sSymNameExist := GetSDName(h1); IF sSymNameExist = gsSymNameCurrent THEN SysBeep; END; END; BEGIN gsSymNameCurrent := StrDialog('Symbol name to search for:', ''); ForEachObjectInList(DoIt, 0, 2, FSymDef); END; Run(CheckSymbolExists);
  11. It sometimes behaves like this Pat but I just tolerate the quirkiness and restart VW, Edit/Exit the WS Editor, etc. until it works. Typical of VS though. You steam along making great progress then something like this of another odd result stops you in your tracks.
  12. Draw a rectangle on any sheet layer, that is just a bit bigger than the page size. Give it a unique name like 'Custom-Select-Rect'. Run the script below and substitute your PIO name for My PIO Name. ForEachObject(SetSelect, ((LOC='Custom-Select-Rect') & (PON='My PIO Name'))); This will select the objects on ALL sheet layers.
  13. Yes once a PIO is event enabled, then everything must be dealt with in the correct event. I'm pretty sure there are some sample event based PIOs floating around or in the SDK.
  14. The duplicates are likely being placed relative to the internal origin.. Try making sure the symbols are being inserted in Event = 3. Otherwise they can be outside the PIO container.
  15. I think you would need to use GetSymbolOptionsN() then SetSymbolOptionsN(), loading the latter with the values from the former, except for the symbol name.
  16. A1. Layer stacking order. A2. Don't know.
  17. Try this slight variation (untested): Procedure SomeCalloutMrgnDialog; Var H1:Handle; B1:Boolean; MrgnCall, MrgnValue,LyrScale:Real; MrgnValueStrng,default,request:String; Procedure GetValues; Begin request:='CallOut PIO Page Unit Margin'; default:='0.0625'; MrgnCall:=DistDialog(request,default); LyrScale:=GetLScale(ActLayer); MrgnValue:=LyrScale*MrgnCall; MrgnValueStrng:=Concat(MrgnValue); End; Procedure SetObj_Value(H1:Handle); Begin SetRField(H1,'Callout','Margin',MrgnValueStrng); ResetObject(H1); SetDSelect(H1); End; Begin GetValues; ForEachObject(SetObj_Value,(((VSEL=TRUE) & (PON='Callout')))); DoMenuTextByName('Previous Selection',0); End; Run(SomeCalloutMrgnDialog);
  18. Sorry, I meant to say this is where it needs to be if you are using collapsing widget separators. Otherwise, it can be used in different places.
  19. I'm not seeing any issues either, but it might depend on where in the code you are calling it. Should be in kObjOnInitXProperties (event 5).
  20. CreateLineWeightPopup() doesn't give the option to use class thickness Andy.
  21. Try GetLineWeightChoice() Andy. At least that's what I use.
  22. Set the above script to be Vectorscript, not Python. If you can't do that, in python it will be something like this: vs.SetClassN(vs.FSActLayer(), 'my class name', True) but I know nothing about python.
  23. You could try this: SetClassN(FSActLayer, 'my class name', True); I likely won't work in groups or symbols though. If used on a group (not in a group), the last argument (true or false) will determine if all the objects in the group also get the class assignment.
  24. You need to use SelectChoice(). The index is zero based so make sure you load the menu from zero.

 

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