Extrating data from .dwg file
Moderators: SDS, support, admin
-
- Posts: 5
- Joined: 01 Oct 2009, 14:15
Extrating data from .dwg file
Hi,
Is there any way to extract the text from .dwg file. I am new to this area, please let me know how to achieve this functionality.
Thanks,
Chandra Sekhar S.
Is there any way to extract the text from .dwg file. I am new to this area, please let me know how to achieve this functionality.
Thanks,
Chandra Sekhar S.
Re: Extrating data from .dwg file
Hello.
You can receive CADText or CADMText object using CADImage.Converter.Entities.Item() property after loading DWG file.
Alexander.
You can receive CADText or CADMText object using CADImage.Converter.Entities.Item() property after loading DWG file.
Alexander.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support
-
- Posts: 5
- Joined: 01 Oct 2009, 14:15
Re: Extrating data from .dwg file
Hi Alexander,
Thanks for the reply. Currently I am using the trail version to test the application. Can you suggest me in more detail, please. Because the CADText and the CADMText classes are not found in the dll file I use. I can only load the image using CADImage class. I am not sure about the namespaces for that. If possible please tell me where can I find the documentation for this.
Thanks
Thanks for the reply. Currently I am using the trail version to test the application. Can you suggest me in more detail, please. Because the CADText and the CADMText classes are not found in the dll file I use. I can only load the image using CADImage class. I am not sure about the namespaces for that. If possible please tell me where can I find the documentation for this.
Thanks
Re: Extrating data from .dwg file
You need CAD Import .NET extended version to access entities. Please mail to support@cadsofttools.com.
Alexander.
Alexander.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support
-
- Posts: 5
- Joined: 01 Oct 2009, 14:15
Re: Extrating data from .dwg file
Hi Alexander,
I had the CAD Import .NET Extension version now. I tried for the solution as you told early to use in this way
System.ArrayTypeMismatchException was unhandled by user code
Message="Attempted to access an element as a type incompatible with the array."
Source="System"
StackTrace:
at System.Collections.Specialized.NameObjectCollectionBase.BaseGetAllValues(Type type)
at CADImport.CADEntityCollection.get_AllStringValues()
at _Default.Page_Load(Object sender, EventArgs e) in d:\DWGExtractor\Default.aspx.cs:line 35
at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
InnerException:
Any help regarding this would be appreciated.
Thanks
I had the CAD Import .NET Extension version now. I tried for the solution as you told early to use in this way
Unfortunately I cannot figure out the Item method in the CADImage.Converter.Entites. After loading the CADImage if I try to use the property called AllStringValues it is throwing the following exception,You can receive CADText or CADMText object using CADImage.Converter.Entities.Item() property after loading DWG file.
System.ArrayTypeMismatchException was unhandled by user code
Message="Attempted to access an element as a type incompatible with the array."
Source="System"
StackTrace:
at System.Collections.Specialized.NameObjectCollectionBase.BaseGetAllValues(Type type)
at CADImport.CADEntityCollection.get_AllStringValues()
at _Default.Page_Load(Object sender, EventArgs e) in d:\DWGExtractor\Default.aspx.cs:line 35
at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
InnerException:
Any help regarding this would be appreciated.
Thanks
Re: Extrating data from .dwg file
Hello.
Please look at the syntax description of the CADImage.Converter.Entities.Item property in CAD Import .NET help system.
Alexander.
Please look at the syntax description of the CADImage.Converter.Entities.Item property in CAD Import .NET help system.
Alexander.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support
-
- Posts: 5
- Joined: 01 Oct 2009, 14:15
Re: Extrating data from .dwg file
This is not related to syntax. The member Item is not available in the CADImage.Converter.Entities class, I say.
Re: Extrating data from .dwg file
Code: Select all
CADEntityCollection.Item Property (UInt64)
Syntax
Visual Basic (Declaration)
Public Default ReadOnly Property Item( _ ByVal handle As UInt64 _ ) As CADEntity
C#
public CADEntity this[ ulong handle ] { get; }
C++
public property CADEntity default[unsigned __int64 handle] sealed {CADEntity get(unsigned __int64 handle);}
J#
/** property */
public CADEntity get_Item(ulong handle);
Alexander.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support
-
- Posts: 5
- Joined: 01 Oct 2009, 14:15
Re: Extrating data from .dwg file
I can see that in documentation dude. But, I cannot figure that either in intellisense and it show compiler error if I used the Item method forcefully. The CADImport.dll version I use is 7.2.2.19035. Please verify this ASAP.
Re: Extrating data from .dwg file
There is a difference between using Item property in different programming languages. For example, if you using VB.NET call this property in such way:
And if you using C# calling will be looks like:
C++ and J# also have own variants of this property using.
Alexander.
Code: Select all
CADImage.Converter.Entities.Item(...)
Code: Select all
CADImage.Converter.Entities[...]
Alexander.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support