Graphscad

Graphscad : The Graphic Nodal Editor for OpenScad
 
HomeCalendarFAQSearchMemberlistUsergroupsRegisterLog in

Share | 
 

 callmodule doesn't show parameter names

View previous topic View next topic Go down 
AuthorMessage
ChrisLT



Messages : 45
Date d'inscription : 2017-01-30
Localisation : Newbury, Berkshire, England

PostSubject: callmodule doesn't show parameter names   Sun 5 Mar - 23:31

I wasn't even aware that it attempted to read the parameter names until I looked at the code. I can't see why it fails, but it certainly does. So, for instance, in callnacamodule.scad you should see that param1 is called 'naca', not 'param1'.
callmodule2d is exactly the same.
Tested in GraphSCAD 1.0.7

Incidentally, I think I now realise why you can chain parameters together. It allows you to know the order of the parameters when you call a module using callmodule. Is this correct?

Just as I created node_variables to declare multiple variables, I find a multiple parameter node useful. I have tried to edit node_param to create node_params but it doesn't work. I can see no reason, but, while the new node appears in GraphSCAD's graphical view, its settings are not recognised by GraphSCAD, even if the only change I make is the filename and matching Node_params classname. I am baffled. It seems the param node must be called node_param, nothing else. Or else there is allowed to be only one node class creating params.

So I have created a new node_param in the zip file below. Just like my node_variables, it allows up to 10 parameters to be declared. As you enter a new parameter's name the input plug for its value appears.
EDIT: I found a backwards-compatibility issue so posted an updated version today. See below.


Last edited by ChrisLT on Mon 6 Mar - 13:10; edited 1 time in total (Reason for editing : Backwards compatibility issue found and fixed. See below.)
Back to top Go down
View user profile
ChrisLT



Messages : 45
Date d'inscription : 2017-01-30
Localisation : Newbury, Berkshire, England

PostSubject: Re: callmodule doesn't show parameter names   Mon 6 Mar - 13:06

I have found that the node_param.py that I posted yesterday has a problem that it is not backwards-compatible with the 'standard' one. This is caused by its first inputs being called 'name1' and 'string1' instead of 'name' and 'string'. I realise this is unacceptable so have changed the first parameter to 'name', keeping the second as 'name2' and so on.
So please do not use the zip file I posted yesterday. Use the one attached here, instead.
Sorry for any inconvenience, which is caused by my not being able to rename the node class to Node_params.
However, the advantage of this new version is that it seems to be totally backward-compatible in that it replaces the previous single parameter node seamlessly, while allowing more parameters to be added to the existing nodes at any time.
So, you can open any existing .scad file and , if you wish, replace multiple param nodes with a single node.
For ease of finding it, I will also post the new version in the 'Show Your Creations' thread.
Attachments
node_param.zip
Updated, backwards-compatible node_param with up to 10 parameters per node.
You don't have permission to download attachments.
(1 Kb) Downloaded 0 times
Back to top Go down
View user profile
Admin
Admin


Messages : 59
Date d'inscription : 2017-01-08

PostSubject: Re: callmodule doesn't show parameter names   Thu 9 Mar - 15:30

Sorry for the late answer.
For the problem of refresh with callmodule, a fix is done in coming version. will do my best to release it this week.

Back to top Go down
View user profile http://graphscad.forumotion.com
Sponsored content




PostSubject: Re: callmodule doesn't show parameter names   

Back to top Go down
 
callmodule doesn't show parameter names
View previous topic View next topic Back to top 
Page 1 of 1
 Similar topics
-
» How do I make the login popup show an Image, instead of it's bland colors
» Design a Poster - 2011 Royal Hobart Show *australia only*
» Show Us Your Bum Photo Contest *usa only*
» Platt College Show and Tell Contest *usa only*
» Help required with JavaScript and Selenese Parameter

Permissions in this forum:You cannot reply to topics in this forum
Graphscad :: Issues-
Jump to: