CreateProperty Component

Recommended Posts


I decided to start a new topic as this question is subset of my Current Component Name post

I have been trying to get this to work for a number of hours and now I am completely lost so I have set up a new file just to test

in my other post you said use CreateProperty() in onLoad - which I though I had done successfully but now I realise not

in the new file all I am trying to do is create a property called timerx and have knob1 set timerx =1 and knob 2 set timerx =2

please see attached screen shot

As my 2nd print ? "this is Knob1 after CreateProperty" has not printed I assume my line CreateProperty(timerz,100) has not run

My understanding is that by using createproperty() I can then have local variables for my timerx components once I set their values

I know this is a very basic question -  but just how is it done?




Link to comment
Share on other sites

  • 2 months later...

You are making a somewhat common error.  timerz as you have it without quotes is a symbol meaning it references a variable, channel or something else with that name.   In your case, it is probably NULL, which causes CreateProperty to fail.  You need to provide a string with the name of the new parameter, i.e.: createProperty("timerz", 100)

This may be a common error because there are a few functions that take symbols when really they should take strings, namely the begin/end functions, i.e. beginseq(), endseq(), etc.  This is left over from very old DAQFactory.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.