Before using ExtendSim 10 to open a custom library or open any model that uses custom blocks created in releases prior to 10, note the following:
If your custom blocks have external source code
First remove the external code using your current release (e.g. ExtendSim 9.3).
Then COPY your custom libraries (with the external source code removed) into the ExtendSim10\Libraries folder.
If your blocks use includes you’ve developed from scratch
Copy your custom includes into the ExtendSim10\Extensions\Includes folder.
If your blocks use the includes that shipped with ExtendSim 9.3.0 or earlier
For includes that shipped with ExtendSim 9.3.0, you don’t have to change block code or include suffixes (e.g. change “Distributions v9.h” to “Distributions v10.h”) until you want to. In addition to the ExtendSim 10 includes, 10 ships with the includes from 9.3.0; they are located in the ExtendSim10\Extensions\Includes\Legacy 9.3.0 folder.
For includes shipped with ExtendSim releases prior to 9.3, rename copies of those includes, put those renamed includes into the ExtendSim10\Extensions\Includes\Legacy 9.3.0 folder, and change your block code to use those includes.
If your custom blocks use modified ExtendSim 9 includes that we sent to you after 9.3.0
Those changes are already in the ExtendSim 10 includes. You can either change your block code to use the 10 includes or copy the modified includes from ExtendSim 9.3 into the ExtendSim10\Extensions\Includes\Legacy 9.3.0 folder such that they replace the non-modified ExtendSim 9.3 includes.
NOTE: Before opening any models, use the ExtendSim 10 Library menu to open custom libraries and test that you've properly made the above changes!
Other Things to be Aware of When Converting Custom Blocks
The first time you open custom libraries in ExtendSim 10 or open models that use custom blocks, the libraries will automatically convert to 10, recompile, and get saved as copies with the extension “.lbr” (rather than “.lix”). That process also protects your prior-release libraries from being overwritten.
Since libraries have a different extension in ExtendSim 10, if you use the extension with the library name anywhere in your code you will need to change the extension. Common places where this could occur are in FileIsOpen, OpenExtendFile, PlaceBlock, and so forth.
The new right-click-connect feature for adding and connecting blocks is database-based and can be adapted for your custom blocks. You can increase the number of common blocks, add your custom blocks, and so forth. If you have any questions, initiate a Support ticket.
If any of your blocks are based on an ExtendSim equation-based block:
Line break and line feed changes in 10 require that you alter your code. For assistance, see the “12/21/2016” comment in the Equation v10.h include file.
Since ExtendSim 10 is a 64-bit application, the external applications that your custom blocks exchange data with, as well as the drivers used to exchange that data, must be 64-bit compatible. This primarily applies to external applications using ODBC and ADO.
Regarding DLLs or Shared Libraries:
DLLs or Shared Libraries called by ExtendSim must be built for 64-bit execution. Either recompile your current 32-bit DLL as a 64-bit DLL or obtain a 64-bit version of the DLL from the vendor.
If your code calls a DLL or Shared Library that returns a pointer, you need to change the code to save the returned value to a pointertype. See the Technical Reference for more information.
The procedure address returned by DLLmakeProcInstance and similar functions is NOT a 64-bit pointertype variable. Instead, it is a 32-bit (4-byte) integer index that points to a pointer internal to ExtendSim 10. This means the 32-bit block code used in previous releases is compatible with the 64-bit code of ES10.
DLLLongCFunction, DLLLongPascalFunction, and DLLLongStdCallFunction all call a DLL that returns a 64-bit integer that can be saved as either a ModL integer (32-bit) or, if needed, a pointertype (64-bit integer/pointer).
Each animation object now has a Properties dialog that allows you to see the object’s zOrder, exactly positioning it within the layers of animation objects.
Use the Icon Positioner if model connection lines are misaligned:
When models that were built prior to ExtendSim 10 are converted to ExtendSim 10, the position of the model’s blocks could be slightly different, causing connection lines to be unaligned. In those cases, the Icon Positioner can be used to adjust the relative location of the icon within the Icon tab so that the connection lines to the block are correctly aligned. This adjustment has already been made in the current ExtendSim libraries, but you may want to use the Positioner for any custom blocks that have been converted from earlier versions.
The Show icon positioner checkbox, located in the Icon tab of the block’s structure, hides and shows the Icon Positioner. By default, the Icon Positioner is located at the upper leftmost position of the icon’s graphic items. The Reset Icon Positioner button resets the location of the Icon Positioner to the default.
To use the Icon Positioner, first determine approximately how many pixels and in what direction the icon needs to move so that the connection lines are aligned. Then in the Icon tab select the Icon Positioner and move it with the cursor or the keyboard arrow keys.
There is also a ModL function, blockAdjustPosition, that uses the location of the Item Positioner to shift the location of the block by the offset of the positioner location.
DateToString, TimeToString, and CalcDate are no longer supported. See instead the EDDateToString and EDCalcDate functions in the Technical Reference.
There are new EColor functions that store the color information as a single integer, rather than using RGV or HSV. (Legacy functions that use and support the old color information are still working in ExtendSim 10.)
As of release 10, ExtendSim no longer supports Dynamic Data Exchange (DDE). It is an outmoded approach that's incompatible with many IT setups, is no longer recommended for use, and is not really being supported by Microsoft. Use instead any of the other IPC capabilities ExtendSim supports, such as OLE.