LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Create From Data Type when scripting crashes LabVIEW

Solved!
Go to solution

When using scripting (LV2010) if I call the Create from Data Type method (available in invoke node when a reference to the BD is wired), if I wire anything but 1 up to the "style" terminal, it crashes LabVIEW. LabVIEW then restarts with a error saying that "The last time you ran LabVIEW an internal error or crash occured at lvmain.cpp, line 1756". If I wire 1 however, it creates a constant fine.         

 

I see in the context help that it always creates a control initially but it seems I can only get it to create a constant. So then I decided ok, work around, create the constant, take the new object refnum it returns and from there change the constant into a control...but I can't get this to work either. Can someone point me in the correct direction? Here is the code and screenshot; it's a quickdrop plugin.

 

it is meant to execute on a cluster that is being viewed as an icon if you want to test it you will need to create that.

 

I submitted it with the "style" value set to 0 so if you don't want LabVIEW to crash, set it to 1.

 

 

 

Download All
Message 1 of 4
(4,104 Views)
Solution
Accepted by topic author GregFreeman

No time for in-depth exploration now.  Create from Datatype also killed my LV10.  What I was able to do after creating a cluster constant, viewing it as icon and selecting it.  (1) With scripting, create a New VI and paste the constant to the diagram (2) Cast the pasted objected to ClusterConstant and Change to Control. 

 

I think I know where you are heading, should be interesting.

0 Kudos
Message 2 of 4
(4,083 Views)

@Darin.K wrote:

No time for in-depth exploration now.  Create from Datatype also killed my LV10.  What I was able to do after creating a cluster constant, viewing it as icon and selecting it.  (1) With scripting, create a New VI and paste the constant to the diagram (2) Cast the pasted objected to ClusterConstant and Change to Control. 

 

I think I know where you are heading, should be interesting.


hint * idea exchange

0 Kudos
Message 3 of 4
(4,075 Views)

A workaround to your issue is to use the Change To Control method on the new constant you just created using Style = 1.  I have submitted CAR#247236 on the issue to R&D.  Good luck.

0 Kudos
Message 4 of 4
(4,039 Views)