[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: 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 483: 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 483: 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 483: 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 483: 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 483: 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 483: 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 483: 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 483: 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 483: 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 483: 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 483: 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 483: 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 483: 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 483: 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 483: 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 483: 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 483: 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 483: 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 483: 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 483: 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 483: 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 483: 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 483: 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 483: 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 483: 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 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
CADSoftTools.com • View topic - OnResolveXRefEvent

OnResolveXRefEvent

Discuss and ask questions about CAD .NET library.

Moderators: admin, support, SDS

OnResolveXRefEvent

Postby dor_r@top-s.co.il » 07 Feb 2017, 21:33

Hi Guys,
I need some documentation on How OnResolveXRefEvent event works
Can I use it to resolve xrefs which are not found on same dir or on original location?
If not I need a way to manually load xrefs

I'm trying to use this code but the xref is not resolved on the image.
Do I need to reload/refresh etc?
Do I do something wrong:

private static bool Converter_OnResolveXRefEvent(CADXRef AXref, string AFileName, ref bool AIsResolve)
{
AXref.AddCADImage(....Path to the current location of xref .....);
AIsResolve = true;
return true;


Thanks Dror
dor_r@top-s.co.il
 
Posts: 8
Joined: 17 Jan 2017, 15:58

Re: OnResolveXRefEvent

Postby support » 10 Feb 2017, 19:56

Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
support
 
Posts: 2663
Joined: 30 Mar 2005, 08:36

Re: OnResolveXRefEvent

Postby dor_r@top-s.co.il » 12 Feb 2017, 08:24

Thanks.
But we still have a major problem. The new XREF is not in the right position, sizing, rotation etc.
Is there a way to copy all sizing, position definition from the unresolved reference?
Or on the other side (which will make things VERY easy) to make the AFileName passes by ref?

Dror
dor_r@top-s.co.il
 
Posts: 8
Joined: 17 Jan 2017, 15:58

Re: OnResolveXRefEvent

Postby support » 13 Feb 2017, 15:41

Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
support
 
Posts: 2663
Joined: 30 Mar 2005, 08:36

Re: OnResolveXRefEvent

Postby dor_r@top-s.co.il » 13 Feb 2017, 15:51

Yes. Exactly.
The xrefs are located in a different directory and different name than the original name it appears in the original model. I have a translation table between the original name and the new name. so for instance what I want to achieve is something like:

private static bool Converter_OnResolveXRefEvent(CADXRef AXref, string AFileName, ref bool AIsResolve)
{
string originalName = AFileName;
string newLoationAndName = findXrefNewLocation(originalName );
if(!string.isNullOrEmpty(newLoationAndName) // if found new xref location
{
AFileName = newLoationAndName ;
AIsResolve=true;
return AIsResolve;

}


AIsResolve = false;
return false;
dor_r@top-s.co.il
 
Posts: 8
Joined: 17 Jan 2017, 15:58

Re: OnResolveXRefEvent

Postby support » 13 Feb 2017, 16:08

Dror,

Thank you for the information.

Currently it is not possible to resolve the XRef by simply changing its file name in the OnResolveXRefEvent handler. But we will take your suggestion into account.


Mikhail
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
support
 
Posts: 2663
Joined: 30 Mar 2005, 08:36

Re: OnResolveXRefEvent

Postby support » 16 Feb 2017, 16:19

Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
support
 
Posts: 2663
Joined: 30 Mar 2005, 08:36


Return to CAD .NET

Who is online

Users browsing this forum: No registered users and 3 guests