Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by MaxStudio

  1. DWorks, but how would I go about referencing an outside plugin object in my script? Is there a way to give the plugin object a name once it is created? I have a plugin object that creates a window in plan. I also have a plugin object that creates a window in elevation. I want to be able to change the width of the window in plan and have it also change the width of the window in elevation. and vice versa. This means I need to be able to create each object seperately and then i need to be able to link the two (using a parameter or a name) is it possible or is there a better way to do this?
  2. Anyone know a way to create two different plugin objects that utilize a common parameter? I want to be able to create an object (objectA) and another object (objectB). I need a way to link objectA and objectB together. Once they are linked I would like them to be able to utilize a common parameter, such as, the object width. This way if I change the width of objectA the width of objectB changes as well. Any ideas? Thanks in Advance Derek
  3. Miguel, Do you have an example of the buttons you are talking about? Thanks
  4. maarten, can you give me an example of a parameter with the prefix. I don't understand exactly where I would place the "__" Thanks
  5. Hey Josh, Thanks its always good to learn how to clean up bulky code!
  6. OK finally got it working correctly oh is the handle ended becoming: SetParameterVisibility(oh, 'parameter', FALSE); IF checkbox THEN BEGIN SetParameterVisibility(oh, 'parameter', TRUE); END;
  7. Ok i've made a little more progress: IF checkbox {boolean} THEN BEGIN SetParameterVisibility(inPlugin, 'parameter', TRUE); END; Is the inplugin handle the object handle created at the beginning of the script, see below result : BOOLEAN; objname : STRING; oh,rh,wh : HANDLE; BEGIN { retrieve custom object information } result:= GetCustomObjectInfo(objname,oh,rh,wh); in this case would oh be the plugin handle?
  8. This is what i found: PROCEDURE SetParameterVisibility(inPlugin :HANDLE; inParameterName :STRING; inSetVisible :BOOLEAN); I would assume something like this would work: IF checkbox {boolean} THEN BEGIN SetParameterVisibility(inPlugin, PParmeter, TRUE); END; What is the inPlugin handle? I know how to give an object created, such as a rectangle, a handle, but how do i give the whole plugin object a handle?
  9. I've created some new plugin objects. The object info palette is becoming overwhelmed with options and variables. Is there anyway to create a sub-menu within the object info palette so that I can hide some options until they are needed? Thank You in advanced!
  10. Everytime I import a DWG file the arrow heads on the imported file are huge. I have to go and select each individual arrowhead and change it manually. Is there a way that I change them all at once without having to do it one by one? The arrowheads are huge in paperspace but look normal in model space.
  11. I seem to have lost the ability to select multiple objects. The only way I can select them is if I completely encircle them. Holding shift doesn't work and intersecting while holding option does not work either. Is there a keyboard shortcut I might have accidentally hit? Thanks in advance
  12. Is it possible to recall printer settings with a script? Sometimes I print full size and at other times I print half size. I print full size to a plotter and I print half size to a printer. Is it possible to store and recall printer settings using a script? It would be nice to just click a button that says "print half size" or "print full size". I know I can use PrintUsingPrintDialog, but I don't want to have to change the settings each time. There is also PrintWithoutUsingPrintDialog, but then I'm guessing it only uses the current print settings. Anyone had any experience with this? Thanks - Derek
  13. I have font problems too! this topic has been very informative thank you!
  14. Lets say I have a list of 20 radio buttons. 19 of the radio buttons are assigned a specific value. The 20th radio button allows the user to input a custom value via 'GetEditReal'. I only want the 'GetEditReal' box to be active when the 20th 'Custom' radio button is selected. I achieved this with the following code: 20:BEGIN IF ItemSel(20) THEN SetItemEnable(21,TRUE) ELSE SetItemEnable(21,FALSE); END; If I click the 'Custom' Radio button the 'GetEditReal' box becomes active and this is where my problem begins. If a user then clicks a different radio button the 'GetEditReal' box continues to stay active. I want it to return to inactive (or grayed out). I know I can accomplish this using the same script above, 1:BEGIN IF ItemSel(1) THEN SetItemEnable(21,FALSE) ELSE SetItemEnable(21,FALSE); END; 2:BEGIN IF ItemSel(2) THEN SetItemEnable(21,FALSE) ELSE SetItemEnable(21,FALSE); END; but I would have to copy the script for each of the 19 radio buttons creating a lot of extra scripting and a lot of extra memory. I am only an amateur scripter so I am not always the most efficient Is there an easier/shorter script I can use to make this box inactive without duplicating the script over and over again? Thanks in advance!
  15. My file looks correct on the screen, but when I print it directly through vectorworks it changes all my fonts to a default font. If I preview the file first and then print it through preview the file prints correctly with all the right fonts. This problem only appears to happen on older macs before the intel switch. I really hate having to print through preview every time I want to print a drawing correctly. Does anyone know why this is happening? Is there a solution to this problem?
  16. I figured out this problem. I'm using mac os X I had to reset the printer system under system preferences. This fixed all the new files I created. Unfortunately, any file that I had printed during this problem remained corrupted and continued to print upside down. I had to copy and paste all my work to a new file to drop the printing errors.
  17. Hey thanks everyone. Do global variables take up more memory? If so why?
  18. I want to know, is it safe to reuse handles within a procedure? My scripts usually generate a lot of objects. Once I am done creating and defining the object attributes can I reassign the handle to a new object? The really want to limit the number of handles I define at the beginning of my script. good idea/bad idea? thanks!
  19. Some of my prints are coming out of the plotter rotated 180 degrees and it is messing with my margins. My System is as follows: Mac OS X 10.5.5 2.4 GHz Intel Core 2 Duo 1GB 667 MHz DDR2 SDRAM VectorWorks 2008 SP3 Not all files are rotating only some. I've checked all my printer settings and everything seems to be ok. Is there any other reason this could be happening?
  20. Hey Josh! Thanks a lot for pointing out that section in the language guide. "subroutines" is exactly what I was trying to accomplish. Ian, thanks for your help. I'm going to try to keep my scripts more organized using the indentation method you have shared with us.
  21. I got the following test to work using sub-procedures. I get confused about where to put things when there are so many end's... lol Procedure ProSub; VAR id:LONGINT; result:LONGINT; gA, gB: BOOLEAN; A,B,C,D: REAL; FUNCTION DED_ProSub(VAR id:LONGINT):BOOLEAN; BEGIN { initialize dialog creation } id := CreateLayout('Procedure/Sub-Procedure',TRUE,'Create','Cancel'); { Menu 1 } CreateStaticText(id,4,'Type:',-1); CreateCheckBox(id,5,'A.'); CreateCheckBox(id,6,'B.'); { Layout Dialog } SetFirstLayoutItem(id,4); SetRightItem(id, 4, 5, 0, 0); SetRightItem(id, 5, 6, 0, 0); DED_ProSub:=VerifyLayout(id); END; PROCEDURE DD_ProSub(VAR item:LONGINT; data:LONGINT); BEGIN; { SET DEFAULTS } CASE item OF SetupDialogC: BEGIN SetItemEnable(5,TRUE); SetItemEnable(6,TRUE); END; 1:BEGIN IF ItemSel(5) THEN gA:= TRUE ELSE gA:= FALSE; IF ItemSel(6) THEN gB:= TRUE ELSE gB:= FALSE; END; END; END; { Begin Define Sub-Procedures ------------------------------- } Procedure Sub; BEGIN Rect(A,B,C*2,D*2); END; Procedure Sub2; BEGIN Rect(A,B,C*4,D*4); END; { End Define Sub-Procedures -------------------------------- } BEGIN IF DED_ProSub(id) THEN BEGIN result:=RunLayoutDialog(id,DD_ProSub); END; IF (result=1) THEN BEGIN A:=0; B:=0; C:=50; D:=50; IF gA THEN BEGIN Sub2; END; IF gB THEN BEGIN Sub; END; END; END; RUN(ProSub);
  22. yes exactly i guess it would be a procedure (sub-procedure) rather than a function.
  23. thanks Ian, include would definitely work. Although, i'm looking to do the exact same thing as $include, but contain it all in a single file. any ideas? Thanks for your help. derek
  24. Is there a way to predefine a function and label it so I can call it when needed instead of retyping it over and over again?


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