Jump to content

tom_shady

Member
  • Posts

    11
  • Joined

  • Last visited

    Never

Reputation

0 Neutral

Personal Information

  • Occupation
    industrial designer
  • Homepage
    no_public_homepage_at_moment
  • Hobbies
    not_public
  • Location
    Germany

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Does Vectorscript support the Datatype Pointer? A correspondend pascal-example is given below. Can?t the Datatype Handle work as a Pointer to memory? / to a variable?s location ? program Pointers; var i: integer; p: ^integer; begin p := @i; end.
  2. i need to query point data that is stored in an XML - the xml will look similar to test3.xml <?xml version="1.0" encoding="UTF-8" standalone="no" ?> <geo> <cloud> <vector> <x>11</x> <y>22</y> </vector> <vector> <x>33</x> <y>44</y> </vector> </cloud> </geo> this is queried with the following script PROCEDURE ReadXML; {Reads data from an XML file, draw a locus} CONST kAppFolder = 1; VAR hXML : LONGINT; xmlFile : STRING; result : INTEGER; str1,str2: STRING; BEGIN UseDefaultFileErrorHandling(FALSE); hXML:= InitXML; IF hXML <> 0 THEN BEGIN {init xml-libary} xmlFile:= 'test3.xml'; {load file into memory} result:= ReadXMLFile(hXML, kAppFolder, xmlFile); {ask file} result:= GetElementValue(hXML,'/geo/cloud/vector/x',str1); result:= GetElementValue(hXML,'/geo/cloud/vector/y',str2); {clear memory} result:= ReleaseXML(hXML); {draw locus} Locus(Str2Num(str1),Str2Num(str2)); END ELSE BEGIN {error} Message('Could not initialize XML reader.'); END; END; Run(ReadXML); i?m using VW 10.5 the functions GetFirstChild(..) GetNextElement(..) are not defined - HOW can I query the second vector of cloud/ or more generally the second child of an element? IS there a special path-Syntax? eg ( not working) result:= GetElementValue(hXML,'/geo/cloud[2]/x',str2); ?
  3. WORKAROUND: Thanks to M. Braach - he told me the following work-around: a opend polygon/line with fillpat 0 has no area... FUNCTION IsPolyClosed(poly:HANDLE):BOOLEAN; {ask wether a polyline / Polygon is opend - returns false - or closed - returns true } VAR oldFillPat : LONGINT; BEGIN oldFillPat := GetFPat(poly); SetFPat(poly,0); IF HArea(poly) = 0 THEN IsPolyClosed := FALSE ELSE IsPolyClosed := TRUE; SetFPat(poly,oldFillPat); END;
  4. i?m using SetRField() to change Parameters of a plug-in-object. How can i provoke the plugin to update ? There must be a undocumentated way with a GetEvent() - Funciton ? see Vectorscript Plug-In Editor -> Object Properties, Script Execution, With Script-Specified Events. How does GetEvent work? Where can i find a Documentation? Thanks
  5. i 'm trying to query the Edge-Visibility of the Segments of a Polygon, and indicate it with green (visible) and red (invisible ) Locus. It seems GetVetexVisibility returns wrong results. any idea to solve this problem ? Using Vectorworks 10.5, mac os x 10.4.8 PROCEDURE PolyInfo; {query all vertex-pts of a polygon and draw a point with color according to VertexVisibility - select a polygon / polyline first} Var poly : HANDLE; n_vert : INTEGER; i:INTEGER; pt:VECTOR; BEGIN { get the handle to the selectet polygon} poly := FSActLayer; { get the number of vertices in the path } n_vert:= GetVertNum(poly); FOR i:= 1 TO n_vert DO BEGIN {select color according to Verte} GetPolyPt(poly, i, pt.x,pt.y); IF GetVertexVisibility(poly,i) THEN PenFore(6) ELSE PenFore(7); Locus(pt.x,pt.y); END; END; Run(PolyInfo);
  6. i found out the following: the pulldownmenuitems are created wenn the dialog is called with RunLayoutDialog(dialogId,drivedialog) drivedialog is your procedure, getting called while the dialog is displayed to the user Procedure drivedialog(item:Longint;data:Longint); RunLayoutDialog will pass item to drivedialog the first time drivedialog is called it will get the value SetupDialogC - this function isn?t documented ;-{ within this call you can create the pulldownitems with InsertCoice() a example is given here: http://www.nemetschek.net/support/custom/vscript/example.php have a look at Align Selected Object hope this will help, even if this discussion is quite old... well google find?s this page first, seems there aren?t so many modern-dialog programmers... Tom
  7. kiwi - thanks for your reply. i know the workaround you mention. - i do it the same way at the moment, but i?m unsatisfied with this solution. isn?t there a solution as i am searching ?
  8. the vectorscript - pdf documentation mustn?t be selected and copied. because it is predefined by nemetschek in this way - why ?? this is horrible. you can?t copy and paste anything from the reference. this is stupid because of all those script - examples.
  9. the vectorscript debugger might offer more usability: layout: it would be great if the script field and the variable field could be predefined as two different windows. using two monitors it is horrible that the variabels are below the text field! reseved word: {$breakpoint} would be wonderful. insert a breakpoint at this location. {$MessageLastUsedVariablesWait 4, 20} also nice: this will Message the last 4 variables that have been used and display them, then wait for 20 seconds. will Do the same as: code: VAR a,b,c,d : INTEGER; BEGIN a :=1; b := 20; c := 300; d := 4000; Message('a ', a , ' b ', b, ' c ', c, ' d ', d); END; [/code]
  10. the VW 3D Rotate View Tool is horrible !!! compared with alias it is missing any intuitive use. / rotate around click point / rotate with full openGL - rendering
  11. i?m developing a plug-in object at the moment. i use a lot of parameters. the problem: how can i oppress / prevent the update of the object ? in the object properties - window i can specify -> script execution -> script specified event. the info says ... must first call GetEvent i can?t find any documentation for the GetEvent - call, function or what it is. the problem: im using to parameters that are multiplied: e.g i want to draw a grid using the parameter PNCOLUMN and PNROW (number of columns , number of rows) PNCOLUMN = 10; PNROW = 1000; (now i draw 10000 polygons) if i change PNCOLUMN = 100; PNROW = 100; the object has also 10 000 polygons but if i change PNCOLUMN first vectorworks updates the object with 100 000 polygons, an my old computer gives me a coffee-break. - even if i don?t need them ?? ---> i dont?t want vectorworks to update my object. i want a botton in the obj info palette, a menu-command or something like this called maybe update_vectorscript_object(); how to do this ? if there is a information or reference just post the link -- thanks Many Thanks for your effort. [ 04-14-2005, 12:00 PM: Message edited by: tom_shady ]
×
×
  • Create New...