Jump to content

VvierA

Member
  • Posts

    182
  • Joined

  • Last visited

Everything posted by VvierA

  1. Hello there, I am using the Basic (i.e. Fundamentals) version of Vectorworks. It lacks the 'normal' Export PDF Menu Item but has a simplified version of it called 'Export PDF (Quartz only)' on the mac version. I want to use this menu item in a Vectorscript but cannot find a way to call it. There is no direct function of it nor is it listet in 'DoMenuTextByName Constants' Is there another way to use it in Vectorscript? Why is it missing? Thanks for help VvierA
  2. Do I get the handle on setting the parameter fields via: resultstatus:=GetCustomObjectInfo(objectName, objectHand, recordHand, wallHand); Or do I have to make it sure in another way? Regarding the 'vsoStateGetParamChng' I am currently studying the Vectorscript References with all event and parameter related information. Not so easy - but maybe I get it. Some sample script might help if somebody knows one. VvierA
  3. My aim is to build something that is similar to the x/y coordinates vs. angle length mode in the object info palette for a line. I want to have the option to enter the tilt of my PIO via angle or tilt in percentage. And I want the object info palette to recalculate the other field when I define one field. In order to do that I defined a variable to transfer the value of the parameter to it. Than I wanted to do the recalculations and write the result back to the other parameter hoping that the value of the parameter in the object info palette will be refreshed. Maybe that concept doesn't work? Do I have to switch between the two methods to enter the tilt of my object by changing the visibility of the parameters? I will try the debugger but I do not know yet if this helps me to finish my script successfully. Maybe you know another example of an PIO where one parameter is calculated by another referring to each other? Unfortunately it is not possible to study the built in tools like the 'Draw a Line' tool where one could study the correlation between the x/y fields and the angle/length mode. That's exactly what I am aiming for.
  4. Thank you all. I found my mistake. I copied the string from the PDF Vectorscript Language Guide and the single quotes were not copied correctly. The difference was hardly visible. Now the function makes no error message but there is another problem: I cannot set the parameter to the new value. The name of the Parameter is GEFPROZENT and the name of the variable (real) is also gefprozent. I use the message function to get feedback and see what the values are. In my example the variable gefprozent is '1', the Num2StrF of gefprozent is also '1' but PGEFPROZENT remains '0'. What is my mistake? Code: resultstatus:=GetCustomObjectInfo(objectName, objectHand, recordHand, wallHand); recordname:=GetName(recordHand); gefaelle:=PGEFGRAD; gefprozent:=tan(deg2rad(gefaelle)); SetRField(objectHand,recordname,'GEFPROZENT',Num2StrF(gefprozent)); message (gefprozent,' ',Num2StrF(gefprozent), ' ',PGEFPROZENT);
  5. The two lines producing the error message are: resultstatus:=GetCustomObjectInfo(objectName, objectHand, recordHand, wallHand); SetRField(objectHand,GetName(recordHand),?Space Width?,'Test'); What I was wondering is: The SetRField function needs a handle and some strings. Maybe the handle 'objectHand' is not successfully retrieved by the line above the SetRField command?
  6. @maarten Thank you for your help. It seems to be that I was on the right way. Unfortunately the error message is still there and I cannot find the typo I might have in my script. Another question concerning your example: What do I need the bool variable for? Or is it just used to get the handles for the setrfield function? Q4: I was looking for a example for a PIO where a parameter can be given in two or more ways. For example a PIO where you can set the tilt via delta y, or angle or as percentage. @ Miguel Thank you also. That sounds interesting. Can you give some links to information about 'event enabled method' and custom made parameter changes? VvierA
  7. Hello there, I'm trying to script a rectangular plugin with some parameters concerning the tilt of a line. The parameters should refer to each other like that: When you enter the angle as a parameter for the tilt in the palette, the parameter for the tilt in percentage should be calculated and vice versa. And want to this just like the reference between polar-angle and classical x/y coordinates mode. No matter which values you enter - the other parameter will be calculated. My idea is, to do that with GetCustomObjectInfo(objName,objHd,recHd,wallHd); and SetRField(objHd,GetName(recHd),?Tilt?, Num2StrF(tilt)); The problem is, that Vectorworks stops with the errors: Line #17: SetRField(objHd,GetName(recHd),?Tilt?, Num2StrF(tilt)); | { Error: Expected a new factor here. } | { Error: Expected a string. } | { Error: Expected , } | { Error: Expected a new factor here. } | { Error: Expected a DYNARRAY of CHARs. } | { Error: Expected ) } | { Error: Did not expect this after end of statement - missing ;? } ________________________________________ Can anybody help? Q1: Is this the correct method to build a plugin with Parameters refering to each other? Q2: If it's the right method - what's the cause for the error message? Q3: Am I right, that it is not possible to call the function 'GetCustomObjectInfo' directly? I have to use it like a handle for example: status:=GetCustomObjectInfo...; And with defining the status handle by that, all the other information will be retrieved an be usable for the SetRField procedure. Q4: Are there any examples or open source plugins where I can study the correlation between two parameters in a rectangle object. Thank you very much, VvierA
×
×
  • Create New...