XANSYS Forum Index
    Register    

FAQ    Search    Memberlist    Usergroups    SmartFeedSmartFeed    Profile    Log in
Stability in using JavaScript Macros in WB
 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    XANSYS Forum Index -> XANSYS
Author Message
primoz.ogrinec
User


Joined: 26 Jun 2015
Posts: 9

PostPosted: Thu Jul 02, 2015 11:44 pm  Reply with quote

Hi,

I'm sending my scripts for meshing and solver controls with the WB.AppletList.Applet("DSApplet").App.Script.doToolsRunMacro(" my path " ) command to Ansys Mechanical. Usually the program and scripts work, but sometimes i get an error (code 800a03f7), saying that the program doesn't recognise ListView.ActivateItem(...).

Why does it sometimes work, and sometimes not. Usually it works after rebooting my computer, but not allways... It's really frustrating.
Back to top
View user's profile Send private message
primoz.ogrinec
User


Joined: 26 Jun 2015
Posts: 9

PostPosted: Thu Jul 02, 2015 11:48 pm  Reply with quote

Is it possible that the comments in the JavaScript code somehow interfere with the interpreter for JavaScript in Ansys?
I have removed some comments and it seem to work, but it could be the same issue as before.

Primoz.
_________________
Primož Ogrinec
Faculty of Mechanical Engineering
University of Ljubljana
Back to top
View user's profile Send private message
primoz.ogrinec
User


Joined: 26 Jun 2015
Posts: 9

PostPosted: Fri Jul 03, 2015 12:36 am  Reply with quote

The issue is aparently not in the comments... :(
_________________
Primož Ogrinec
Faculty of Mechanical Engineering
University of Ljubljana
Back to top
View user's profile Send private message
marcello.oliveira
User


Joined: 17 Jul 2014
Posts: 4

PostPosted: Fri Jul 03, 2015 5:13 am  Reply with quote

Primoz,

Before calling ListView, you may try to add
ListView=DS.Script.lv;
_________________
Marcello Oliveira
Magneti Marelli Powertrain
Hortolandia, Brazil
Back to top
View user's profile Send private message
primoz.ogrinec
User


Joined: 26 Jun 2015
Posts: 9

PostPosted: Sun Jul 05, 2015 3:09 am  Reply with quote

Marcello, you made my week. :)

Is there a similar solution while sending the macro to Mechanical using

WB.AppletList.Applet("DSApplet").App.Script.doToolsRunMacro("$_path" );

I get similar behaviour as by the listview problem.

Primoz
_________________
Primož Ogrinec
Faculty of Mechanical Engineering
University of Ljubljana
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    XANSYS Forum Index -> XANSYS
All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

sleek template created by Andrew Charron