Jump to content

VvierA

Member
  • Posts

    182
  • Joined

  • Last visited

Everything posted by VvierA

  1. Hello, I'm still looking for a way to scale a symbol via Vectorscript. I found that it is possible to scale symbols with the Object Info Palette. But how can I access these settings via Vectorscript? None of the 'scale' functions of Vectorworks worked yet. Thanks for help VvierA
  2. Hello, I use Num2Str(2,realvalue) to convert a real to a string and round it with two decimals. The problem is: if realvalue is already a whole number - let's say 56 - the result is 56 as a string. But I want it to be 56.00. Can anybody help? VvierA
  3. Thank you. I tried HScale2D but it doesn't scale the symbol. Maybe symbols could not be scaled yet (VW2012).
  4. Cool, thank your for that hint. I used GetClass and SetClass to get the Class of the PIO and assign it to the polyline. May I ask another thing? I try to scale the symbol that is placed together with the polyline as a part of the custom PIO. I tried ScaleObjectN but it needs a constant (?) named 'const WorldPt&' as scale center. I do not know what that is? How can I define the scale center with just one value? http://developer.vectorworks.net/index.php?title=VCOM:VectorWorks:ISDK::ScaleObjectN VvierA
  5. Hello, I made a custom 2d path object tool to generate special 2d polygons. It works great and I can use the tool to generate the polygons. The problem is: If I try to change the class of the PIO afterwards the polygon does not adopt the graphic attributes (line color, line weight etc.) of the new class. Do you have any hints? Thank you, VvierA P.S. I generate the polygon by using the 2d path tool and with 'CreateDuplicateObject'.
  6. Hi Matt, thank you very much. Looks promising. I'll try that. VVierA
  7. Hello again, this forum is really great. I hope I may ask another question. I made a 2d path plugin object with an embedded symbol. Now I try to generate control points for the 4 corners of the symbol. The symbol varies in size so I thought I have to retrieve the width and height of the symbol via Vectorscript. I tried: widthVAR := width(S=symbolnameSTR) but it doesn't work. Maybe there is another way to retrieve (calculate) the x/y coordinates of the corners of the bounding box of the embedded symbol? Or maybe there is an even more simple way to place control points in the corners of an embedded symbol? Thank you for tips and hints, VvierA
  8. I succeeded to register and login to the mailing server but it says 'There are no public lists on this server.' if I try to list 'All Lists'.
  9. @Kevin Great - the code works very well (although I do not understand the meaning yet). Maybe you can help with another (related) question...: Together with my 2d path I place a symbol. Is there a way to evoke an edit mode so that I can move that symbol 'within' my 2d path object. I.e. move it without ungrouping = destroying the 2d path object? VvierA
  10. Thanks again. I will try that. Do you know if there is an overview for options like "kObjXIs2DSurfaceEligible"? I didn't find anything here: http://developer.vectorworks.net/index.php?title=Main_Page VvierA
  11. @Kevin Thank you very much. Restarting helped although my object is not event enabled afaik. Another strange thing: If I double click the 2d path VW enters the 'edit extrude along path profile' mode. What can I do to start the 'standard 2d reshape mode' for polygons on double click? VvierA
  12. Hello, I try to make a custom 2d path object with Vectorscript. The object has a lot of parameters but the object info palette shows only 7 of them. Is there a limitation of parameters for the object info palette? How can I get over the limitation? or Is there another 'simple' way to allow the user to enter parameters for a path object other than the object info palette? (I do not feel capable to program a custom dialog so it would be great to enter the values via the object info palette.) Thanks for help VvierA
  13. @Miguel Fantastic. That's it. Works perfect. Thank you so much. VvierA
  14. Thank you very much Miguel. In the meantime I examined the script of Example 9 and succeeded to make an alternative solution to generate a 2D path by duplicating the drawn vertex path (see code below). Anyway I am looking now for a way to automatically close the polygon. Do you know a way to 'access' the 'close'-Checkbox via Vectorscript? VvierA PROCEDURE 2dpath; VAR theEvent, theButton :LONGINT; result :BOOLEAN; objHand, recHand, wallHand, pathHand, dupeHand :HANDLE; objName :STRING; BEGIN IF GetCustomObjectInfo(objName, objHand, recHand, wallHand) THEN BEGIN pathHand := GetCustomObjectPath(objHand); dupeHand := CreateDuplicateObject(pathHand, objHand); END; END; Run(2dpath);
  15. Thank you Miguel. If I understand you correctly I have to insert code that draws the lines. And I get the coordinates to draw the lines from the data that is returned by the vertex code. What confused me was an example I found at vectorlab (Example Nr. 9) http://www.vectorlab.info/index.php?title=Events#Example_9 It's actually an example to explain Object events but it uses the 2D Path object and so I tried it. There is lots of object event code inside but strangely I can not find any code for drawing lines or polygons in this script. So how does it work? Thanks again VvierA P.S. Strange enough the example does not work like it should. It should go 'into 2D Reshape mode on double click' but if I double click an instance of that object it goes into the 'edit path object profile' mode.
  16. Hello, I am a beginner and to start with vectorscript I'd like to make a simple 2D path object. It should work like the standard Vectorworks polygon tool but the polygon should close automatically after creation. I succeeded to generate a new 'empty' 2d path object with no code yet and to integrate this new tool in my workspace. Although there is no code yet, I can draw a 2D polygon shape. The problem is: the shape is invisible. It shows no lines and no filling. I can select it by 'select all' and it is shown in the info palette but it is not possible to change the appearance to make it visible. Question: What code do I have to add to make the path visible respectively to make this 'generic' 2d path behave like the original 2d polygon tool? Kind regards VvierA
  17. Hello, I am a beginner and to start with vectorscript I'd like to make a simple 2D path object. It should work like the standard Vectorworks polygon tool but the polygon should close automatically after creation. I succeeded to generate a new 'empty' 2d path object with no code yet and to integrate this new tool in my workspace. Although there is no code yet, I can draw a 2D polygon shape. The problem is: the shape is invisible. It shows no lines and no filling. I can select it by 'select all' and it is shown in the info palette but it is not possible to change the appearance to make it visible. Question: What code do I have to add to make the path visible respectively to make this 'generic' 2d path behave like the original 2d polygon tool? Kind regards VvierA
  18. Hello, I am registered user of the german version of Vectorworks 'Fundamentals', called Vectorworks 'Basic'. There is a menu command called 'Klassen...' in the context menu (right click). I tried to call this menu via DoMenuTextByName('Klassen...', 0); but Vectorwords does not recognize the Menu. 'Error: KLASSENTOOL DOMENUTEXTBYNAME - Menu cannot be found. Klassen...' Does anybody know if there is a limitation to the procedure to certain menu commands and is there another way to call the Menu? Best regards VvierA
  19. Hello there, another simple question for a beginner like me: I generated a polyline with VS. Closepoly; Beginpoly; AddPoint(0,-(PBOXWIDTH/2)); AddPoint(pLINELENGTH,-(PBOXWIDTH/2)); AddPoint(pLINELENGTH,(pBOXWIDTH/2)-(gefprozentv*pLINELENGTH)); AddPoint(0,(PBOXWIDTH/2)); Endpoly; Now I want to change the visibility of the line segments with SetVertexVisibility. But I need a handle to the previously generated polyline. How do I get it? Thank you for help VvierA
  20. Hello Josh, thank you very much so far. Finally I got it. I read some warning about the complexity of event management in Vectorscript and decided to try the other method with the hidden parameter to compare the values. It works great. The setting of the parameter also works now even though I do not know what the problem was. Maybe the restart of VW helped. The debugger is also very helpful.
×
×
  • Create New...