Sign in to follow this  

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?




Share this post

Link to post
Share on other sites

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.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this