The Siemens Community Catalyst program was co-created with our community to acknowledge technology leaders who consistently contribute to the Siemens Community. Nominations are accepted on a rolling basis.
Submitted by Joe on Tue, 09/22/2009 - 10:19
I want to create a VisSim block and put it on the windows clipboard so that I can paste it into any VisSim diagram. Is there a way to do that?
Submitted by pete on Tue, 09/22/2009 - 10:32.
I have attached a simple MFC project below that will create VisSim blocks in your application and copy them to the clipboard. It works for label blocks and transfer functions but can be easily extended to all blocks. Here are two of the key functions:CString makeBlock( LPCSTR blockType, LPCSTR blockName)<br> {<br> CString s;<br> s = '; VisSim Block Diagram Format (VBDF)\r\n';<br> s += 'N.1=\'';<br> s += blockType;<br> s += '\'*1x1\r\n';<br> s += 'n=\'';<br> s += blockName;<br> s += '\'r\n';<br> return s;<br> }<br> void CMainFrame::OnCopyTransferfunction()<br> {<br> CString s = makeBlock('transferFunction', 'myfile.m');<br> s += 'Xi=\'0 \'\n'; // Initial condition<br> s += 'Xg=1.2\n'; // Gain<br> s += 'Xn=\'1 2\'\n'; // Numerator<br> s += 'Xd=\'3 4\'\n'; // Denominator<br> setVsmClipboardData(s);<br> }
CString makeBlock( LPCSTR blockType, LPCSTR blockName)<br> {<br> CString s;<br> s = '; VisSim Block Diagram Format (VBDF)\r\n';<br> s += 'N.1=\'';<br> s += blockType;<br> s += '\'*1x1\r\n';<br> s += 'n=\'';<br> s += blockName;<br> s += '\'r\n';<br> return s;<br> }<br> void CMainFrame::OnCopyTransferfunction()<br> {<br> CString s = makeBlock('transferFunction', 'myfile.m');<br> s += 'Xi=\'0 \'\n'; // Initial condition<br> s += 'Xg=1.2\n'; // Gain<br> s += 'Xn=\'1 2\'\n'; // Numerator<br> s += 'Xd=\'3 4\'\n'; // Denominator<br> setVsmClipboardData(s);<br> }
Unable to find an attachment - read this blog
Join us for a community conversation on accelerating power electronics design, where you'll learn how to leverage the fast simulation capabilities of Simcenter PSIM alongside the powerful design exploration and optimization features of Simcenter HEEDS. In this webinar, we’ll show how engineers can move beyond manual…
Join us for a community conversation on Pulse Width Modulation (PWM), a fundamental technique in electric motor control, and explore how different PWM strategies can yield significantly different results. This webinar provides a comparative analysis of various PWM methods and their effects on motor efficiency, torque…
Join us for a community conversation to discover the Advanced Iterative Solver(AIS) in Simcenter Feko and its application to electrically large and computationally demanding electromagnetic models. The session will provide a general overview of how iterative solution methods can help improve efficiency of large scale…