[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead [phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 5077: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3937) [phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 5079: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3937) [phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 5080: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3937) [phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 5081: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3937) forum.datacad.com View topic - D4D - Dialog to accept a Symbol File Name
The DataCAD Developer Network (DDN) is an online resource for information and support for DCAL® (DataCAD Applications Language) developers as well as anyone interested in creating fonts, toolbars, hatch patterns, or linetypes for use in DataCAD.
Whilst I can use the standard Delphi open file dialog to accept a Symbol File name from the user, it does not display a preview window. It would be possible to write a custom component that displayed a preview, but it would be a relatively major effort as it would need to cater for every possible entity type .
I'm 99% certain the D4D does not provide an OpenSymbolFile type of dialog, but if it does then I would be grateful is somebody could point it out to me!
If there is no current function available to D4D, then is there an existing procedure in DataCAD to show a symbol file dialog, and could that procedure be exposed to D4D to provide this functionality to a macro?
DataCAD's Open Dialog w/ Preview class inherits the TJvOpenDialog class which inherits the TOpenDialog class. TJvOpenDialog is from the JEDI Visual Component Library, so exposing this dialog or some derivative is a rabbit hole I don't want to go down. That said, I've exported a 'SymbolPreviewOnPanel' procedure we use internally to draw a symbol on a TPanel.
I haven't had a chance to test it in a D4D application yet, but you should be able to create a form with a TPanel and in the TPanel's OnPaint event pass the panel and symbol which would work for symbols that are already loaded in an open drawing.
For previewing external symbols on the hard drive, I might be able to export another function 'Convert2NewSymbol' which accepts a symbol filename and returns a sym_type which can then be passed to SymbolPreviewOnPanel. When I get some time, I'll look into it further.
Thanks Mark . When you mentioned SmartEntity2RegularEntities to me a few weeks back it was already there and worked (just not documented or included in UInterfaces), so I assumed this one may have been in the same category ... I'll give it another shot with the next build. (For backward compatibility of my macro I'll use it in a try/except block with the exception handled appropriately in case the user does not have the latest build.)
Interesting list of exposed functions. I assume that the ones with _C suffix are for the C++ version of DCAL. Most of those have equivalents without the _C suffix (but not all).
Just tested in 22.01.01.15. It is not throwing any exception, but appears not to do anything (nothing displayed on the panel). I will probably look into this further in the future, but probably not worth spending a significant amount of time on this at this stage from my point of view ....
A follow up for anybody else that may be interested in using this functionality ....
After some further off-forum discussion with Mark, it is obvious that the SymbolPreviewOnPanel does work if you compile your macro using Delphi 6 (version used to compile DataCAD). It does not work if compiling with Delphi 10.3 (which I am using). It appears that there is a compiler version issue when passing a TPanel parameter. Not sure at which version between 6 and 10 this became an issue.
Previous versions of Delphi are available to people with the latest paid version, but as I am using the Community Edition I don't think there is a way for me to get Delphi 6 even if I wanted to.
A note regarding Delphi 10.3 that I am using: In-line variable definitions were introduced in this version. This is a nice feature imho, but I am not using it as the editor highlights inline definitions (and some code following them) as errors. The code compiles fine, but I find the error indications in the editor too distracting.