Jump to content

AFDesign

Member
  • Content Count

    57
  • Joined

  • Last visited

Everything posted by AFDesign

  1. Hi, I'm working with a 2D path object plugin, and I'd like to detect if the path has been created on a screen plane or layer plane. I tried this: GetObjectVariableBoolean(handle, 1160); using both plugin and path handles, but I always get the same result drawing in screen plane or layer plane. Any advice is appreciated, thanks! Andrea
  2. AFDesign

    How to detect screen plane/layer plane?

    GetPlanarRef doesn't work too. I created a new 2d path plugin and GetObjectVariableBoolean 650 and 651 works correctly, Pat! I will check what's wrong in my code. EDIT: Now I understood. Variable 650/651 read if an object is 2D or 3D: a 2D object in a custom plane is detected as 3D. For this reason the new plugin I created works, because I only created a 2D polyline to test. But my plugin use the 2D path to create a 3D object, so I receive the same value because my object is a 3D object, in both screen or plan mode. The only way to solve my problem is being able to read the custom plane tilt, but I didn't find a command for this. (I found GetWorkingPlaneN but it isn't relative to an object) Thank you all!
  3. AFDesign

    How to detect screen plane/layer plane?

    Sorry I'm using a 2D path plugin so I can't post a small sample. I will create a new 2d path plugin and I will try your advice on it! I will let you know if it works tomorrow. Thank you!
  4. AFDesign

    How to detect screen plane/layer plane?

    Thank you Pat, I tried but I always receive the same result, using 650 and 651. Maybe it is possible to detect if the plane is horizontal or tilted?
  5. AFDesign

    Texture width/height

    Hi, Can somebody help me? I need to read the width and height values of the bitmap image in the "color" family of a texture. What am I doing wrong? htexture:=getobject(texturename); {texture handle OK I get it} hshader:=getshaderrecord(htexture,1); {shader handle for "color" OK I get it} hbitmap:=gettexturebitmap(hshader); {bitmap handle of shader OK I get it} width:=GetObjectVariableLongInt(hbitmap,530); {return zero} height:=GetObjectVariableLongInt(hbitmap,531); {return zero} Thanks, sorry for my english!
  6. A new version of Foliage plugin is available: video Foliage 2.0 allows you to create a range of fairly complex hedges, espalier, topiary, mass and vertical plantings or areas with any symbol following a site model. More information on www.andreafacchinello.it.
  7. Hi, it would be very nice if Vectorscript could take advantage of multi-core cpu in repetition statements, for example: PROCEDURE multicore; var hascanceled:Boolean; total,counter:integer; BEGIN total:=4000; counter:=0; hascanceled:=false; ProgressDlgOpen('Start multicore test...', true ); ProgressDlgSetMeter('Please wait...' ); ProgressDlgStart(100.0,total); while (counter < total) do begin {...cpu-intensive operations} counter:=counter+1; progressdlgyield(1); hasCanceled := ProgressDlgHasCancel; if hasCanceled then counter:=total; enablemulticore; {doesn't wait end of operation, start the next with another core} end; {while} progressdlgend; progressdlgclose; end; Run(multicore);
  8. AFDesign

    Progress Dialog bug?

    Hi, I have the same problem reported in this post using "progress dialog" function on a plugin I wrote. You can quickly reproduce the problem in this way: 1) create a new script and paste "example 1" from here 2) run the script: if you click cancel button it works correctly; if you push the ESC button all stops but the dialog remains opened and, even if you close its window, vectorworks menus are locked and grayed out (impossible to quit) Tested with Vectorworks 2016 SP1 on OSX 10.10.5 Any workaround to solve this adding some code to the example?? Thanks
  9. AFDesign

    Grayed out menu

    Hi, I have the same problem using "progress dialog" on a plugin I wrote. You can quickly reproduce the problem in this way: 1) create a new script and paste "example 1" from here http://developer.vectorworks.net/index.php/VS:Progress_Dialog 2) if you click cancel button it works correctly; if you push the ESC button all stops but the dialog remains opened and, even if you close its window, all is locked and grayed out. Tested with Vectorworks 2016 SP1 on OSX 10.10.5 Any workaround to solve this adding some code to the example?? Thanks
  10. AFDesign

    UndoOFF

    Thank you, I will try to get more info about this. But if I don't use undooff I get only one regen, not two.
  11. AFDesign

    UndoOFF

    Hi, does it exist additional documentation for the "UndoOFF" procedure more than http://developer.vectorworks.net/index.php/VS:UndoOff ? My plugin take some time to regenerate so I use "Progress Dialog" to have visual feedback. If I put UndoOFF (after Begin) my plugin regenerate 2 times: when the progressbar end, it restart one more time. Without UndoOFF it works correctly, but I need it to reduce memory use. Thanks for your help!
  12. AFDesign

    UndoOFF

    I finally found a workaround, if someone is interested: 1) SetMaximumUndoEvents(0); 2) execute script 3) restore maximum undo events end of monologue
  13. AFDesign

    UndoOFF

    I tried everything, it's probably a bug. if you try this simple code in a linear object plugin, when it regenerates with undooff you will receive the alert message twice, if you delete undooff it will works correctly (only one alert). Any workaround? Thanks PROCEDURE Example1; BEGIN undooff; ovaln(0,0,0,1,1m,1m); {draw a circle} alertinform('Plugin regenerated!','',false); END; Run(Example1);
  14. AFDesign

    Scaling symbols

    Hi, I made a simple 3D polygon with a texture. If I create a symbol with this object and I set a symmetrical 3x scale, in opengl view I correctly view both symbol and texture scaled, but if I render I see the repeated original texture (not scaled). Is this a bug or can it be solved in some way? Thanks
  15. AFDesign

    Scaling symbols

    Hi, here you are the vwx file with the symbol. If it's not a bug and there is a way to fix it please let me know, thanks so much!
  16. AFDesign

    Autorotate

    Hi, anybody know if it's possible to assign the "autorotate" feature (that we can found on "VS:CreateImageProp") to a simple texture or 3d polygon, without creating an imageprop? Thanks
  17. AFDesign

    Modelling rainwater pipes

    Hi, I updated Downspouts to v1.3. You can download it from my website, "Free resources" section. Changes: ? improved 2D representation (new class for downspout projection) ? improved 3D pipe curves ? improved brackets representation Have a nice day
  18. AFDesign

    Two Questions :)

    Sorry Tui, I can't help you this is all new for me too.
  19. Maybe you can try to 1) read z value of your object with GetSymLo3D 2) move zDistance to -z value using Move3DObj method
  20. AFDesign

    Two Questions :)

    Hi Tui, If I understood correctly, my "Custom Beams" does exactly what you're asking, look this video to verify if. Have a nice day www.andreafacchinello.it
  21. Hi, anybody knows if it's possible to change "Alternative name" of parameters from the script? Thanks
  22. AFDesign

    Texture width/height

    No problem thank you again and have a good vacation!
  23. AFDesign

    Texture width/height

    Hi Andrew, I need "paint width" and "paint height" of the color shader (bitmap) of the texture (pixel size). On VS:Function_Reference_Appendix I found the function that I need: ObjectVariableLongint(530) and ObjectVariableLongint(531) but I can't make them work. I got handle of texture map, handle of color shader and finally handle of "texturebitmap" but I can't get pixel dimensions of that texturebitmap. htexturemap:=getobject(texturename); {object type=97-Texture Definition (Material)} hshader:=getshaderrecord(htexturemap,1); {get color shader handle} htexture:=gettexturebitmap(hshader); {object type=93-Texture} message(getobjectvariableint(htexture,530)); {should return pixel size but doesn't work} Can you help me? Thanks
  24. AFDesign

    Modelling rainwater pipes

    When I created the tool I included "Enable 2D" option to allow the auto-hybrid command. I will take in consideration your suggestions, thanks for your feedback !
  25. AFDesign

    Modelling rainwater pipes

    I'm happy you appreciate it, thanks for customization. If you send me the icon I can change mine too. I will update it in the future with a rectangular profile. I started creating this tool with the idea to create a gutters tool too, but I haven't so much time. If somebody wants to create it and share It would be great!

 

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.

×