Jump to content

RDS Casa

Member
  • Posts

    202
  • Joined

  • Last visited

Posts posted by RDS Casa

  1. Hello,

     

    Thanks so much for the suggestions. I've been through this and it is incredibly helpful. I feel 75% of the way through. I need something slightly different, and I'm hoping its as easy as adding the P into to the script.

     

    I have the a python script Point object now in my work space (its a point object script in my case, not a tool script) - this is all worked out from the example. In Alan's example, he is able to call on the parameters at creation, but if you look 6:04 in the video, it does not bring those parameters into the OIP for change after creation? For my point object, this is needed.

     

    Also, I have set up several sliders and pop ups in my marionette script. I really need these to come through to the point object, as they appear in the marionette object? 

     

    Is this possible? I think its the sliders that are will not work?

     

    Thanks again for any help.

  2. Actually, that exactly what I need. I'd love you to go through my script and engineer out the bugs, but I should get VW2018 in a matter of days, and by the sound of it the valve will stream line the process quite a bit, so that's probably going to save us both quite a bit of time. 

    A kind offer though, thank you. 

  3. Thanks. So I hoped this might work in other scripts, but it does not (at least for me) . For example, I need to group all the objects at the end, but if the object is deleted, the group node returns an error., or if a parameter is zero, a rectangle is not formed (ok) but then the extrude node falls over (not ok)

    I'm hoping this valve node resolves all these. Does it work like a stop? And why is there no if/else node?

  4. Hello

     

    I thought I would share this.

     

    I have tried to hack the slider code, so that it inputs a dimension in mm, not an integer.... It only goes and works!!!! at least it appears to? I tried it in a imperial inches and a yards file and it worked.

     

    No one is more surprised than me. Use with caution... because it might cause problems. If someone wiser than me would like to check and correct, please do.

     

    Edit the slider code, remove the #grey text at the top.

    Replace the whole content with:

     

    #fjs 05.12.17

    @Marionette.NodeDefinition
    class Params(metaclass = Marionette.OrderedClass):
        this = Marionette.Node( 'Dim Slider' )    
        this.SetDescription('An dimension value corresponding to the location on the slider. The range of the slider is defined by the two last values in the Int variable within the script.') 
        #NOTES ON USE
        #Marionette.OIPControl( '[NAME]', Marionette.WidgetType.Slider, [DEFAULT VALUE (integer)], 'description', [MIN VALUE], [MAX VALUE])
        dim = Marionette.OIPControl( 'Dimension mm', Marionette.WidgetType.Slider, 620, 'description', 300, 900)
        dim.SetDescription('An OIP slider') 
        d = Marionette.PortOut('Dim')
        d.SetDescription('A slider OIP control that accepts unit indicators')
        
        
    def RunNode(self):
        units = vs.GetPrefReal(150)        
        self.Params.d.value = self.Params.dim.value/units

     

    • Like 1
  5. Hello again,

     

    I've been playing with the delete node at the end of an if node should the test prove false. Its fine when the tick box (include additional geometry) is not ticked as the geometry is deleted. But there is an error message when the button is ticked (i.e. the additional geometry is to be included), because the delete node has nothing to delete.

     

    What I have discovered is that the modified delete node at the end of this discussion does not return error message

     

    https://forum.vectorworks.net/index.php?/topic/42671-quotifquot-node-question/&

    (the only file still on there to down load?, at the very end)

     

    Thats fine, but I like to understand why these things work and I don't?

     

    The only difference in the code:

    def RunNode(self): #this is as per library node

        if self.Params.obj.value != vs.Handle(0): #this is the additional code

            vs.Marionette_DisposeObj(self.Params.obj.value) #this is as per library node

     

    Clearly I'm not a python coder: is this single line saying only run the delete (disposeObj action) IF there is a object being operated on (a handle)

     

    And if so, should this work for any other nodes which are falling over due to a lack of things to process?? Because then I might fit it in to the extrude node when there are no objects to extrude?

     

    I'm guessing, any advice gratefully received. 

     

    Thanks

     

     

     

  6. Thanks. I'm trying to sort my vss for 2018, might have it sorted by end of week, but I'd still like to understand the example in 2017 because there are a few other scenarios in similar problems I need to resolve. So if you can, it might really help. Thanks so much  

  7. Actually the Boolean strategy does not work, I get an "invalid callback function parameter type" error, because the extrude node has nothing to extrude. I'm expecting it to have nothing to extrude, when the boolean is false. 

     

    (it works for not creating a rectangle, with a 0 width for example, but falls over when it tries to push the non existent rectangle on to a extrude node.

     

    I can't find a stop node.

     

    I can't work out how the delete node would work if I created all the geometry then deleted the bits I don't need?

     

    Any ideas??

     

    Thanks

  8. Hello all.

     

    I've been going through the forum examples looking for examples of the If node. I can't find any (please direct me if there are any) , so I've been left to experiment.

     

    I can get it to work with a Boolean input, i.e. a tick box in the OIP

     

    But how do I get it to work from a pop up menu? What I'm trying to do is use a pop up to drive the geometry in a marionette object. Say a chair,  with the popup menu to change the cushion from round, to square, to triangular? 

     

    I can create the popup, and have it assign values to the chosen option, but a bit stuck where to go from here.

     

    Any examples of similar actions?

     

    Is there a simple node to convert a value, 0 or 1 into a true / false boolean? I think that would do it.

     

    maybe the if node is not the best way?, but I imagined some kind of

    if round do this,

    if not round then if square do this

    in not round, if not square, then do this.

     

    Some logic chain like this for the number of options... something like this at any rate.

     

    Thanks

  9. Hello, sorry, not updated to 2018 yet, just need to sort out the vss login details,  but in the short term ...

    I was adding brackets to name of my nodes to control user input  e.g.

    "Width (200 - 400mm)"

    Big NO to this.

    Its taken me ages to work out why nothing was happening. I've been copying and posting bits of the network into a sand box layer, until I eventually found out that if you put brackets into a name, it all stops working????? at least this is happening to me.

    Are names text and numbers only? I've not read anything about restrictions? 

    VW should stop you from putting these in if so.

     

     

  10. Thanks,

     

     I can get it to work for the first 3 options but not for any more options I add? The other options I've added display in the pop up, and I've added the following at the end of the script

     

    if input == 0:
            self.Params.output.value = 40
        if input == 1:
            self.Params.output.value = 38
        if input == 2:
            self.Params.output.value = 30
        if input == 3:
            self.Params.output.value = 19
        if input == 4:
            self.Params.output.value = 18

     

    But only the 40, 38 and 30 work

     

    Is this restricted to 3 choices? or where am I going wrong?

     

    Also, Can I assume that the other intermediate inputs (radio buttons etc) can be bastardised in the same way?

     

    Thanks

  11. hello, this discussion is a little old now, I just wanted to check this is still the best way of making an adaptable  pop up in the OIP?

    I messed about with Marissa's adapted pop up node, and I can get it to do what I need (I think)... but is this still the best way? I'll have to copy this special bastard node (sorry, I could not think of a better name! and semantically this is correct?) around multiple files, or save it to the marionette resource for use later?

     

    Why have the original node that is locked down? without the ability to change the pop up strings? and or their values?

     

    Thanks Marissa for the file, and Alan for highlighting how its different to its parent.

     

     

  12. Hello.

    Is there way to put limits on the dim input nodes? Or alert users to the limits? Eventually my script creates a marionette object. But if some of the user parameters go below a given number the relationships fall over. So ideally the control parameters in the user info box will not let the parameters go below (or above) a give size range?

    Thanks so much

  13. Hello,

    I have created a marionette plugin object. I need the object to run in pre marionette VW versions, and I'd quite like to lock down the marionette network so it does not break anyway. From marionette , its possible to save the marionette script as a Python script, and sure enough it generates a python script for me. 

     

    However, when I run the script, it creates a single instance of the object using all the default parameters. I need the script work as a plugin object with the same parametric functionality, only without it being a marionette object.

     

    Is this easy? am I missing a simple step here? Or is it actually quite complicated to generate the object info controls???

     

    Also, I think I recall python only coming in to vector works around 2012? So I'm guessing even the python script would not work for older legacy versions?

     

    Thanks

    Rob

  14. Hello,

     

    Doe anyone know if its possible to encrypt or lock a marionette object so it can't be broken by other users? I see its possible to convert the marionette network into a python script. This would be fine, but how do I then take this script, and have it as a parametric object within vectorworks? am I missing a step, or can this just not be done?

     

    Thanks

    Rob

     

×
×
  • Create New...