Results 1 to 2 of 2

Thread: Exception with CSharp Conversion example

  1. #1
    Join Date
    Nov 2012
    Posts
    2

    Default Exception with CSharp Conversion example

    I recently installed BlueBeam Q and experimented with the C# examples, which can be located at C:\Program Files\Bluebeam Software\Conversion Server\Code Samples\C#\CSharp Conversion
    I am facing exception in C# Conversion example provided.

    Code:
    adaptor.PageSizeEnum = PageSizeEnum.ANSI_A;
    adaptor.ScaleType = BbScaleType.ScaleToFit;
    adaptor.Set(AcadPageSetupConst.PLOT_TYPE, 1);
    adaptor.Set(AcadPageSetupConst.CENTER_PLOT, true);
    adaptor instance doesn't seem to have the properties named PageSizeEnum, ScaleType etc and it gives a null exception.

    Exception below:
    Code:
    C# Conversion Begin...
    SourceFile: E:\test\Test.doc
    OutputFile: E:\test\Test.pdf
    Connecting to Server...
    Using Word.plugin
    System.NullReferenceException: Object reference not set to an instance of an obj
    ect.
    
    Server stack trace:
       at Bluebeam.Hydra.LightProgrammaticInterface.PluginAdaptor.set_PageSizeEnum(P
    ageSizeEnum value)
       at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(
    IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInCont
    ext, Object[]& outArgs)
       at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMes
    sage msg, Int32 methodPtr, Boolean fExecuteInContext)
    
    Exception rethrown at [0]:
       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage req
    Msg, IMessage retMsg)
       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgDa
    ta, Int32 type)
       at Bluebeam.Hydra.LightProgrammaticInterface.IPluginAdaptor.set_PageSizeEnum(
    PageSizeEnum value)
       at BluebeamQAPI.CSharpConversion.Example.Main(String[] args) in C:\Program Fi
    les\Bluebeam Software\Conversion Server\Code Samples\C#\CSharp Conversion\Exampl
    e.cs:line 107
    Converting...
    Using Word.plugin
    System.NullReferenceException: Object reference not set to an instance of an obj
    ect.
    
    Server stack trace:
       at Bluebeam.Hydra.LightProgrammaticInterface.PluginAdaptor.set_PageSizeEnum(P
    ageSizeEnum value)
       at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(
    IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInCont
    ext, Object[]& outArgs)
       at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMes
    sage msg, Int32 methodPtr, Boolean fExecuteInContext)
    
    Exception rethrown at [0]:
       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage req
    Msg, IMessage retMsg)
       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgDa
    ta, Int32 type)
       at Bluebeam.Hydra.LightProgrammaticInterface.IPluginAdaptor.set_PageSizeEnum(
    PageSizeEnum value)
       at BluebeamQAPI.CSharpConversion.Example.Main(String[] args) in C:\Program Fi
    les\Bluebeam Software\Conversion Server\Code Samples\C#\CSharp Conversion\Exampl
    e.cs:line 107
    Converting...
    Conversion Complete
    Can someone help me. Problem seems to be with the Adaptor being not having necessary properties.

    System configuration:
    OS running: Windows 7
    VS 2010
    Experimented with .dwg(created and exported from Adobe Illustrator) and .doc(created in MS Word 2010).

  2. #2
    Join Date
    Apr 2012
    Posts
    74

    Default

    Hello,

    We asked the developers to look at this and there isn't anything obvious in the error log that indicates the problem.

    Is the Q Server Running at the time you are running this code? If not, please start it and try again as this does need to be running.

    What kind of files are you trying to convert (e.g. Word, AutoCAD)? Do you have the native application for the file type you are trying to convert installed on the server? You must have the native application installed on the server in order for Q to be able to convert the file.

    If Q Server is running, and you have the native application installed, can you please contact our support department directly (support@bluebeam.com) so we can further assist you? Please include the entire code you are attempting to use, including any changes you have made to it, in your email.

    Thanks,