I want to get the local ip in flexsim, could it be possible?
I want to get the local ip in flexsim, could it be possible?
Hi @yexioamu, was Jason Lightfoot's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.
If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always comment back to reopen your question.
In the latest versions you can create this python module and set up a user command to access getLocalIP():
import socket def getLocalIP(): hostname=socket.gethostname() ip=socket.gethostbyname(hostname) return ip
(obviously you need to have Python installed for this solution)
In earlier versions you can write a dll function that will return the ip. You might also be able to do it via a command line that creates at text file you can load:
runprogram("cmd /C \"ipconfig|find \"IPv4 Address\" > ip2flexsim.txt\"\"")
My FlexSim is 21.2.4, it can use the dll function but not python; dll works well, but the cmd line run in flexsim can't output the ip, but when i run cmd in windows directly, it work well, maybe the reason is chinese encoding.
runprogram("cmd /C \"ipconfig|find \"IPv4 地址\" > ip2flexsim.txt\"\"")
You could just remove your Chinese characters. The command still works fine:
runprogram("cmd /C \"ipconfig|find \"IPv4\" > ip2flexsim.txt\"\"")
16 People are following this question.
why content vs time and staytime vs time is showing blanked?
Video running differently from simulation
any web page where i can download VRML (.wrl) files? i want to simulate the sky and clouds
i have a problem in my simulation with VR?
For a model of frozen chips, how do I add liquids at certian stages?
FlexSim can help you understand and improve any system or process. Transform your existing data into accurate predictions.
FlexSim is a fully 3D simulation software environment. FlexSim can be used to simulate any process in any industry.
FlexSim®, FlexSim Healthcare™, Problem Solved.®, the FlexSim logo, the FlexSim X-mark, and the FlexSim Healthcare logo with stylized Caduceus mark are trademarks of FlexSim Software Products, Inc. All rights reserved.
Privacy | Do not sell or share my personal information | Cookie preferences | Report noncompliance | Terms of use | Legal | © Autodesk Inc. All rights reserved