Jump to content
Liang

Palette Editing API

Recommended Posts

Hi,

I try to use "Write/Read Palette" functions in my VI. And it works well.

But after I built it to EXE file. An -4406 error happened.

Error -4406 occurred at an unidentified locationPossible reason(s):LabVIEW:  A VI item in the palette data array is not supported in this version of LabVIEW.

post-15967-125083160316_thumb.jpg

Has anyone met this problem before? Or can anyone help me?

Thanks a lot.

Share this post


Link to post
Share on other sites
I try to use "Write/Read Palette" functions in my VI. And it works well. But after I built it to EXE file. An -4406 error happened.

I suspect that your VI is trying to edit the palette of the runtime engine (which, of course, doesn't have palettes).

Share this post


Link to post
Share on other sites

I suspect that your VI is trying to edit the palette of the runtime engine (which, of course, doesn't have palettes).

Hi Crelf,

My VI is used for modify "Item Path" programmely of an existing MNU file.

Have you tried to build any VI that contains "Write/Read Palette"?

Edited by unCLAD

Share this post


Link to post
Share on other sites

Hi Crelf,

My VI is used for modify "Item Path" programmely of an existing MNU file.

Have you tried to build any VI that contains "Write/Read Palette"?

Hi unCLAD

A work around for this would be to build you VI into and EXE so you have a nice GUI for distribution as you are doing, but when you want to do the actually work of editing the menu file, you will need to call an instance of LabVIEW and run the working VIs in the development environment. This will get around having no support for those functions in the run time engine.

Other products do this e.g. VIPM, Sciware GOOP Wizard etc...

Some people call the working VIs Agent VIs :ph34r: and the link might be a good example for you to check out.

Share this post


Link to post
Share on other sites

Hi unCLAD

A work around for this would be to build you VI into and EXE so you have a nice GUI for distribution as you are doing, but when you want to do the actually work of editing the menu file, you will need to call an instance of LabVIEW and run the working VIs in the development environment. This will get around having no support for those functions in the run time engine.

Other products do this e.g. VIPM, Sciware GOOP Wizard etc...

Some people call the working VIs Agent VIs ph34r.gif and the link might be a good example for you to check out.

Hi Jgcode,

Thanks for your reply.

I did not mean to edti menu file at run time. I just want to generate MNU file that was used for letting LabVIEW know how the VIs distributed on function palette programmely.

MNU fileā‰ menu file

Share this post


Link to post
Share on other sites

Hi,

I try to use "Write/Read Palette" functions in my VI. And it works well.

But after I built it to EXE file. An -4406 error happened.

Error -4406 occurred at an unidentified locationPossible reason(s):LabVIEW:  A VI item in the palette data array is not supported in this version of LabVIEW.

post-15967-125083160316_thumb.jpg

Has anyone met this problem before? Or can anyone help me?

Thanks a lot.

I think what you need to do is open an application reference and pass it to your Read/Write Palette functions. Use machine name "localhost" also check that your VI Server Configuration is correct by going to Tools -> Options. Enable TCP/IP and machine access to 127.0.0.1

Share this post


Link to post
Share on other sites

I think what you need to do is open an application reference and pass it to your Read/Write Palette functions. Use machine name "localhost" also check that your VI Server Configuration is correct by going to Tools -> Options. Enable TCP/IP and machine access to 127.0.0.1

Hi SciWare,

I try to use Open Application Reference and use "localhost" as Machine Name input. And I also check the VI Server Configuration.

But I still got the same results.sad.gif

Share this post


Link to post
Share on other sites

Hi SciWare,

I try to use Open Application Reference and use "localhost" as Machine Name input. And I also check the VI Server Configuration.

But I still got the same results.sad.gif

Weird, I just tried it, it should work but doesnt.

Time to try an agent.

Share this post


Link to post
Share on other sites

I just knocked up a demo that shows how to implement an agent to read the palette from an exe.

Agent.PaletteDemo.zip

Hope this helps

Hi SciWare,

Thanks, this still can not work on my PC.

There is a question, why use agent? Could you like to tell me the reason?

Share this post


Link to post
Share on other sites

There is a question, why use agent? Could you like to tell me the reason?

This is what I was referring to in my post.

Certain functions do not operate in the Run Time Environment.

Therefore you can still create an EXE but you need to use Development Environment (LabVIEW IDE) to do the work.

E.g. Creating/editing a MNU file.

The Agent VI does just that.

Share this post


Link to post
Share on other sites

Hi SciWare,

Thanks, this still can not work on my PC.

There is a question, why use agent? Could you like to tell me the reason?

Can you provide more detail, is there an error message?

I included source code and a build, did either of those work?

Share this post


Link to post
Share on other sites

Can you provide more detail, is there an error message?

I included source code and a build, did either of those work?

Hi SciWare,

I try to shut my firewall and open TCP and set my LabVIEW VI Server.

But it cannot work.

Error:

post-15967-125115826654_thumb.jpg

VI Server Setting:

post-15967-125115835793_thumb.jpg

post-15967-125115836316_thumb.jpg

This is what I was referring to in my post.

Certain functions do not operate in the Run Time Environment.

Therefore you can still create an EXE but you need to use Development Environment (LabVIEW IDE) to do the work.

E.g. Creating/editing a MNU file.

The Agent VI does just that.

Hi Jgcode,

Thanks for your explanation.

I'm learning it now.biggrin.gif

Share this post


Link to post
Share on other sites

Are you getting the error when you run the executable or the source code?

Is anyone else who downloaded the demo experiencing the same issue?

What version of LabVIEW are you using?

Try the suggestions in this link.

Share this post


Link to post
Share on other sites

Are you getting the error when you run the executable or the source code?

Is anyone else who downloaded the demo experiencing the same issue?

What version of LabVIEW are you using?

Try the suggestions in this link.

Hi SciWare,

Thanks, my problem has beed resolved.

My VI Server setting is wrong.

The Agent is great.thumbup1.gif

Share this post


Link to post
Share on other sites

Hi SciWare,

Thanks, my problem has beed resolved.

My VI Server setting is wrong.

The Agent is great.thumbup1.gif

Brilliant!!

Yeah, it's a handy technique.

Share this post


Link to post
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.

Guest
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.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.