Jump to content

Musisback

Member
  • Content Count

    154
  • Joined

  • Last visited

Community Reputation

0 Neutral

1 Follower

About Musisback

  • Rank
    Journeyman

Personal Information

  • Occupation
    Engineer
  • Location
    Belgium

Recent Profile Visitors

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

  1. I found it : gSDK->CreateOffsetObjectHandle works fine. Sorry to have bothered you with this post. Regards,
  2. Hello, I am looking for an equivalent in the SDK of the vectorscript function OffsetPoly that works on 2D polylines. VS:OffsetPoly works on polygones and polylines just as the offset tool : but can be used in plugin objects. I tried GetOffsetRingPoly of the VWPolygon2D class but it return a polygone, not a polyline. Any ideas ?
  3. Well, it works, but it is quite tricky because the duplicate doesn't have a name after duplication... Here's how I do : function duplicateClass(className : string) : string; Const ProvName = '###NewClass###'; VAR newClass, class2duplicate : handle; BEGIN class2duplicate := Getobject(className); newClass := CreateDuplicateObject( class2duplicate,getparent(class2duplicate)); SetName(newclass,ProvName); RenameClass(ProvName ,className); duplicateClass := Getname(newClass); END;
  4. Hello, I use external packages in python. I'm wondering what's the best way to distribute them to the plug-ins users. It's apparently bad to place them in the plug-ins folder because Vectorworks goes through all the subfolders of "Plug-ins" at startup looking for plug-ins files I think I could create a Python folder in the user application folder. Do you think it can be damaging to the application to have an extra folder full of subfolders in the user's application folder (next to Plug-ins, Libraries, Workspaces, ...) ? Do you have better ways to distribute external python packages ? Thank you, Regards,
  5. I have the exact same problem... No solution found yet, sorry...
  6. Hello, The python interpreter of Vectorworks automatically generates .pyc files in a __pycache__ folder. It does it if the plugin is encrypted (obfuscated) or if it's not. On the other hand, it seems quite easy to uncompile .pyc files : http://stackoverflow.com/questions/5287253/is-it-possible-to-decompile-a-compiled-pyc-file-into-a-py-file) Does that mean that it is not possible to properly protect our source code? Wouldn't that be easier to simply distribute the .pyc instead of the encrypted vso/vst/vsm file ? Common .py files would not need to be packed up in each plugin file and the plugins would therefore be lighter...
  7. I use a different approach to solve this issue. I created a command that clears all the modules in a designated folder. (In the example : myLibrary) It actually removes the modules from sys.modules. Python will therefor import them again at the next import statement. I find this much easier than placing "reload(module)" statements everywhere in my code. (especially since they need to be removed for deployment) import sys modulesToDelete = [] for m in sys.modules: moduleName = str(m) if "myLibrary." in moduleName: modulesToDelete.append(moduleName) currentModule = __name__ for mod in modulesToDelete: if mod != currentModule: # Python cannot delete the current module del sys.modules[mod]
  8. Hello, Is it possible to duplicate a class via Vectorscript? Thanks
  9. Awesome ! It works... It's weird because the VectorScript Function Reference guide says for the function "BuildResourceList" Well, I'm glad it is fault.
  10. Hello, I use resources from an external file in a PIO dialog thumbnails popup control. ( ex : wooden panels textures). I don?t want other texture ( from the current file but not from the external file) to appear on top of the list. I could erase some textures but I cannot make the difference between the resources that are in my current file and also in the external file (previously imported) and the resource that are in my current file but not in my external file. Any Idea ? Damien
  11. You have to display a new updated dialog. I had a similar problem. See this thread: http://techboard.vectorworks.net/ubbthreads.php?ubb=showflat&Main=35278&Number=173908#Post173908
  12. Hello, Is it possible to build a resource list with only a part of the symbol definitions of the external file. (For instance, only one symbol folder.) I actually want some symbols to appear in my dialog box but not all of them. I cannot move the others in another file because they are sub-parts of the main symbols. VectorScript Function Reference says for VS:BuildResourceList: But it doesn't seem to be true. All symbols appears for me. Thanks,
  13. Here is how I did it : BeginPoly3D; Add3DPt(TopPt.X,TopPt.Y,TopPt.Z); Add3DPt(TopPt.X,TopPt.Y,TopPt.Z -1 ); EndPoly3D; getBBox(lnewobj,pt2D.X,pt2D.Y,pt2DBis.X,pt2DBis.Y); DelObject(lnewobj); Its pretty ugly but it works. If someone has better, I'd be glad to read it...
  14. Thanks but it seems to be for 2D points not 3D... I'd like to get the screen coordinates of 3D points, whatever the 3D view is.
  15. It is maybe because your plugins files are located in the program files folder instead of the user folder (appdata)...

 

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