Jump to content

GioPet

Member
  • Posts

    98
  • Joined

  • Last visited

Posts posted by GioPet

  1. @matteoluigi  thank you for reporting that.

     

    We have also found that the installer fails if the workspace file (.vww) has been renamed, thus creating a mismatch bewteen the filename and the fileheader.

    To check the fileheader, simply open the .vww file with a simple text editor - line 2.

     

    [and make sure not to edit the vww file with the text editor as you can break the workspace]

  2. Hi @elepp

     

    thanks for letting me know of this, and I'm sorry for the inconvenience.

    Please send us a video at support@smartpaste.co.uk and we'll look into the problem.

     

    We've rarely ecountered cases of workspace corruption - usually on a workspace that was converted from older versions of VW.

    As note - even if the installer is unable to add SmartPaste to your Workspace, the Plugin will still be added to the Plugin Manager, so you can edit you Workpsace and  add SmartPaste manually.

    if it helps, see these steps to edit your workspace: https://youtu.be/KWMPSm3uCKg

     

    When working with SmartPaste, it's usually recommended to assign the typical shortcuts for 'Cut' 'Copy' 'Paste' and 'Paste In Place' to the SmartPaste equivalent.

     

    Regards

    Giovanni

    • Like 1
  3. Hi all,

     

    after a few weeks of stop due to health reasons,

    I am glad to announce that we have just pushed the release SmartPaste 3.4.5!

     

    @Tom Klaber I confirm SmartPaste is now fully compatible with Vectorworks 2019, 2020 and 2021 - on MacOS and Windows!

    as well as all previous versions down to VW2014.

     

    Thank you all for the interest expressed in SmartPaste so far!

    We'll appreciate any help with spreading the news on this release!

     

    all the best for now

    Giovanni

    • Like 2
  4. Hi @cberg,

     

    indeed it's the 'mid-tier' version that will be discontinued.

    The upgrade to SmartPaste Pro will be valid to be used on 2021 as well.

     

    Hi @Tom Klaber

    SmartPaste Pro is BIM compliant - in other words it can process the classes contained within BIM components (Plug-In-Objects) such as Walls, Slabs, Doors, Windows etc

    these are not handled with the standard SmartPaste functionality.

    In addition to that,  SmartPaste Pro can be usied in conjunciton with Uniclass class naming which is otherwise not processed by SmartPaste.


    We have recognised that these tools are often the norm in a Vectorworks workflow, even on projects which are not strictly BIM, and acknowledge that the historic separation between SmartPaste and SmartPaste Pro doesn't reflect the current standard practice.

     

    I hope that explains?

  5. Hi all,

     

    Thank you for following up with this post.

     

    We have finally concluded the SmartPaste update for compatibility with VW2019 and 2020, while we have started working on 2021 compatibility only after its release last week - which will keep us busy for another couple of weeks.

     

    The 2019/2020 update will be released next week, so please sign up to the newsletter to be notified further.

    Please note that with this update, the Basic version of SmartPaste will be discontinued.

     

    Existing customers with a working license of SmartPaste Pro, will be able to update to the latest version with their current license.

     

    For anyone following this Post, but not currently a SmartPaste user, I’m offering 20% Discount with the following Code :
    VW_COMMUNITY

     

    Thank you all again for supporting SmartPaste and I’ll appreciate any help with spreading awareness of this plugin!

     

    all the best for now.

    Giovanni

    • Like 2
  6. Hi Pat, 

     

    Thanks for clarifying - does that mean there is no way to call the function 'Site Model from Source Data'?

     

    I've been looking to test calling the actual name of the plugin, but I can't even identify it...

     

    As part of a wider function, what I'm trying to achieve is to call up the 'site model' dialog to then generate a 3d terrain from selected 3D locus points.

     

    Any alternative solutions? 

  7. Hi Nicolas,

     

    thank you for the response but unfortunately that doesn't solve it - i've tried with several indexes.

     

    Based on Vectorscript Function Reference, Terrain is the submenu so the following should work:

    vs.DoMenuTextByName('Terrain',1)

     

    But it doesn't work either..

     

  8. Hi, 

     

    I am trying to call the function 'Site Model from Source Data...' found under the menu AEC>Terrain>

     

    I haven't been able to figure out how to call this using vs.DoMenuTextByName.

    Doing some digging, I've noticed that in the Workspace Editor the function is 'hidden' under the command 'Site Model Processor'

     

    Does anyone have any idea on how to go about this?

    Thank you!

  9. Hi all, 

     

    I am looking into setting VP visibilities through a script - as an example, I'd like to begin with turning off wall components in a viewport.

    Has anyone had experience with anything similar?

     

    In the Function Reference I could only find functions related to viewport overriders, but not to other visibility settings.

     

    any suggestion on how to tackle this?

  10. Hi and thank you both!

    I found the solution in both the problems you've pointed out.

     

    for future reference, here are the steps i've gone through.

    The following is to work around the lack of the function SetClassN in VW versions prior 2018:

    1. Create List (or Dynarray if in VS) of Handles to Groups in the file
    2. change the Class of each Group through a for loop that takes each item in the list
    3. If the Layer of the Group is different from the Active Layer, the target layer is activated
    4. The Group is Selected, Ungrouped, Re-Grouped in the TargetClass

     

    The following code creates unwanted layers as well as unexpected Groups with different results.

    The issue is caused by a NIL handle creeping into the ExtendedGroup list - although I haven't figured out why this happens and its behaviour generates always different results...

    ExtendedGroups = []
    
    def BuidlList(h):
    	global ExtendedGroups
    	GroupLayer = vs.GetLayer(h)
    	if GroupLayer != vs.ActLayer():
    		ExtendedGroups.append(h)
    
    
    def Script():
      
      criteria = '(T=GROUP)'
      vs.ForEachObject(BuidlList, criteria)
      
      vs.NameClass('None') #the TargetClass is be specified as intended
      
      for item in ExtendedGroups:
        layName = vs.GetLName(item)
        if layName != vs.GetLName(vs.ActLayer()):
          vs.Layer(layName)
        
        # here follows is a set of function, e.g.
        vs.SetSelect(item)
        vs.Ungroup()
        vs.Group()
        vs.DSelectAll()
    
    Script()

     

    As per Raymond indication - my logic would follow to exclude NIL items from being passed on to the for loop, thus adding these:

    for item in ExtendedGroups:
      if item != None:
        # all the functions to be performed - as above
      else:
        vs.AlrtDialog('Handle to Group is NIL!')

    I may be wrong, but I can't figure out why this logic fails - yet this still leads to unwanted results and additional layers...

     

    The only way I got it to work is to wrap the for loop in another loop that runs for each layer in the document:

    #after collecting all layer names in the document in a list named 'LayerList'
    
    for Lnames in LayerList:
    	for item in ExtendedGroups:
          if item != None:
        	# all the functions to be performed - as above
            else:
              vs.AlrtDialog('Handle to Group is NIL!')

     

    Thank you again for the suggestions!!

    It had become a headache..

     

     

  11. Hi Raymond, 

     

    thank you for your response.

    I am actually writing this in Python - but it's all using VS functions.

     

    Here is a snippet of my code:

    for item in ExtendedGroups:
    	layHand = vs.GetLayer(item)
    	layName = vs.GetLName(layHand)
    	vs.Layer(layName)
    
       	vs.SetSelect(item)
    	
       	vs.Ungroup()
    	vs.NameClass(TargetClass)
    	vs.Group()
    	vs.DSelectAll()

    This is a for loop that goes through the items (which are handles to Groups) in a list - equivalent to a DYNARRAY in VS.

     

    So I actually never spell out the name of the layer in the code - but if I run this on a file with a layer named 'Design Layer-1', the vs.Layer() function does generate a new layer called 'Design Layer-2'.

     

    The result of the script should be that it changes the Class of Groups in the file - instead it generates as many new 'Design Layer-x'  as the number of items found in ExtendedGroups.


    I can't think of ways around this problem.. but I may be completely unaware of something I should know about this??

     

    PS - thanks for the heads up with invisible characters! I use BBedit and turned on my Invisibles.

  12. Hi Joshua, 

     

    thank you for your reply.

    I am modifying the objects through the script - amongst other things I need to Change the class of certain objects and realised that SetClass cannot retain the class of the objects within Groups!!


    SetClassN would do the job but it's available only since VW2018.. 

     

    To move a Group from a class to another (achieving the equivalent of SetClassN), my workaround is:

    1. Activate the Group's layer
    2. Activate the desired class
    3. Ungroup and Group

    But the Ungroup function won't work when I parse the handle of Groups which are not on the active layer - so I tried to use the Layer function to switch to each layer and change the class, but I've hit the problem..

    Can you think of any other approach to this??

     

    I agree with your answer and I would always ensure layers are properly named, but I need to get this script to work in almost any scenario - including drawings by others..

     

     

  13. Hi all, 

     

    this is a 'back to basics' question.

     

    Here is the problem I'm coming across: if the layer name ends with a number, the VS function  Layer creates a new layer by incrementing the last digit.

     

    A simple example: 

    layerName: 'Design Layer-1';
    Layer(layerName);

    this will generate a layer named 'Design Layer-2' instead of activating the existing layer.

     

    I am using ForEachObject to parse a set of objects through particular function.

    Through the function, I need to activate the layer of the referenced object so that I can edit some of its parameters - but this won't work where layers end with a digit.

     

    Can anyone suggest a workaround to Activate the layer of an object in this situation??

    is there any function to activate the layer through its handle or through a referenced object?

     

    thank you!

  14. Hi Pat, 

     

    thank you for your reply.

    I have tried using the <Folder>MyPythonPackage</Folder>  but when I run the encrypted vsm in a Vectorworks installation that has no bs4 library installed, I get the following:

    697561942_ScreenShot2018-10-25at10_09_52.thumb.png.df0be664b5628a8c17e73ce3b99e8521.png

     

    So this is not working...

     

    In my understanding, when you say 'look for the lib as usual package with py files and include these instead' isn't that done by adding all the py files of the library in the xml Package? in this way:

    <File>bS4/</File>
    <File>bS4/__init__.py</File>
    <File>bS4/.py</File>
    <File>bS4/diagnose.py</File>
    <File>bS4/element.py</File>
    <File>bS4/testing.py</File>
    <File>bS4/builder/__init__.py</File>
    <File>bS4/builder/_html5lib.py</File>
    <File>bS4/builder/_htmlparser.py</File>
    <File>bS4/builder/_lxml.py</File>    

    thanks for your advice.

    Giovanni

  15. That's the case:

    <?xml version="1.0" encoding="UTF-8" standalone="no"?><!-- This file defines how the corresponding script plug-in should be packaged--><Plugin>
        <Package>
            <File>Development/code/__init__.py</File>
            <File>Development/bS4/</File>
            <File>Development/bS4/__init__.py</File>
            <File>Development/bS4/.py</File>
            <File>Development/bS4/diagnose.py</File>
    		<File>Development/bS4/element.py</File>
    		<File>Development/bS4/testing.py</File>
    		<File>Development/bS4/builder/__init__.py</File>
    		<File>Development/bS4/builder/_html5lib.py</File>
    		<File>Development/bS4/builder/_htmlparser.py</File>
    		<File>Development/bS4/builder/_lxml.py</File>        
        </Package>
    </Plugin>
  16. Hi Joshua, 

     

    thank you for your response.

    Yes my user folder was set to /7_Vectorworks 2017, and I keeping the xml in the Plug-in folder within that.

    For clarity - I have know reverted back to the standard path and still keeping the xml next to the vsm.

     

    Indeed, I don't have a 'main.py' because all my code is in the vsm.

     

    The Encryption works with no errors, but when I run the Encrypted vsm on a different installation of Vectorworks I get the error:
    ImportError: No module named 'bs4'

    (bs4 module is the BeautifulSoup module) 

    My python call in the script is: 

    from bs4 import BeautifulSoup

    So something is not working in actually binding the package with the vsm file..

    any idea?

    here is a screenshot of my Plug-in Folder  with the Development/code and Development/bs4  folders.

     

    PluginFolder.thumb.png.632af6b8d76ef1bd72283f8027651151.png

     

     

    thank you

    Giovanni

     

  17. Hello, 

     

    I have been working on a few Python Scripts that use third party libraries - for example BeautifulSoup4.

    I intend to Encryption this script into a vsm plugin so that the external libraries are bound to it and can be used on other installations of Vectorworks.

     

    I realised that the Encryption/Obfuscation method through Vectorworks is not able to bind the external packages into the vsm file:

    I've included the path to these libraries in the Script Options and I am using the steps indicated by Vlado in this post for the related xml file.

     

    ScriptOptions.thumb.png.3ff7fcd50d33d9815d7a8120164e5b04.png

     

    <?xml version="1.0" encoding="UTF-8" standalone="no"?><!-- This file defines how the corresponding script plug-in should be packaged--><Plugin>
        <Package>
            <File>code/__init__.py</File>
            <File>bS4/</File>
            <File>bS4/__init__.py</File>
            <File>bS4/.py</File>
            <File>bS4/diagnose.py</File>
    		<File>bS4/element.py</File>
    		<File>bS4/testing.py</File>
    		<File>bS4/builder/__init__.py</File>
    		<File>bS4/builder/_html5lib.py</File>
    		<File>bS4/builder/_htmlparser.py</File>
    		<File>bS4/builder/_lxml.py</File>        
        </Package>
    </Plugin>

    Can any one advise on how to resolve this?

    Thank you in advance.

     

    Giovanni

×
×
  • Create New...