.NET

Reply
Distinguished Contributor
Posts: 223
Registered: ‎02-17-2006
Message 1 of 7 (77 Views)

Anyone else with this issue?

77 Views, 6 Replies
02-17-2006 01:03 PM
I've been tampering with dimensions, and while attempting to create a "horizontal" or "vertical" dimension I've hit a nasty problem.

Essentially what I think is happening is that the wrapper is creating an aligned dimension object instead of a rotated dimension object, and when it tries to use setRotation() to set the field, it access read-only memory.

Does anyone here know of a workaround, or another way to create a horizontal/vertical dimension using the .net objectarx wrapper classes? The dimensions need to stay horizontal/vertical if their grips are moved by the end-user.

If you want to verify my problem, you can use the attached snip of code, or you can do the following:

Create a new RotatedDimension object.
Set the 3 points (XLine1Point, XLine2Point, DimLinePoint)
Try to change the rotation.

Thanks in advance
*Tony Tanzillo
Message 2 of 7 (77 Views)

Re: Anyone else with this issue?

02-17-2006 01:49 PM in reply to: jbooth
You're correct.

The ctor for RotatedDimension is calling the
ctor for AcDbAlignedDimension.

I don't think there's any workaround other
than writing your own wrapper.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006
http://www.acadxtabs.com

wrote in message news:5090116@discussion.autodesk.com...
I've been tampering with dimensions, and while attempting to create a "horizontal" or "vertical" dimension I've hit a nasty problem.

Essentially what I think is happening is that the wrapper is creating an aligned dimension object instead of a rotated dimension object, and when it tries to use setRotation() to set the field, it access read-only memory.

Does anyone here know of a workaround, or another way to create a horizontal/vertical dimension using the .net objectarx wrapper classes?
The dimensions need to stay horizontal/vertical if their grips are moved by the end-user.

If you want to verify my problem, you can use the attached snip of code, or you can do the following:

Create a new RotatedDimension object.
Set the 3 points (XLine1Point, XLine2Point, DimLinePoint)
Try to change the rotation.

Thanks in advance
Distinguished Contributor
Posts: 223
Registered: ‎02-17-2006
Message 3 of 7 (77 Views)

Re: Anyone else with this issue?

02-17-2006 02:58 PM in reply to: jbooth
That's not good, since I have no idea how to do that (I'm new to the arx library, and am learning via the .NET wrapper classes).

I would hate to resort to COM interop in order to get this done, since I don't know how much longer Autodesk is going to support it. I need to write code using VB so other employees can read and edit it in the future...

Is this an issue that was confirmed by Autodesk? Any idea if it will be fixed in a future patch/release? As long as their dev team knows about it, I'm satisfied. :smileyhappy:
*Tony Tanzillo
Message 4 of 7 (77 Views)

Re: Anyone else with this issue?

02-18-2006 05:17 AM in reply to: jbooth
It's not an issue that I know has been confirmed by
Autodesk. I was able to confirm your suspicion, by
looking at the disassembled code for that class, and
it calls the ctor for the umanaged AcDbAlignedDimension,
which fully explains the problem.

As for whether it will be fixed in R17 or not, I have no
idea. The only workaround I know of aside from resorting
to unmanaged C++, is to use COM.

I'm pretty sure that someone from Autodesk is watching
so they know about now, if they didn't already.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006
http://www.acadxtabs.com

wrote in message news:5090199@discussion.autodesk.com...
That's not good, since I have no idea how to do that (I'm new to the arx library, and am learning via the .NET wrapper classes).

I would hate to resort to COM interop in order to get this done, since I don't know how much longer Autodesk is going to support it. I need to write code using VB so other employees can read and edit it in the future...

Is this an issue that was confirmed by Autodesk? Any idea if it will be fixed in a future patch/release? As long as their dev team knows about it, I'm satisfied. :smileyhappy:
*tp
Message 5 of 7 (77 Views)

Re: Anyone else with this issue?

02-18-2006 06:12 AM in reply to: jbooth
See atached Tester (modified).
Maybe can help you.



escreveu na mensagem news:5090116@discussion.autodesk.com...
I've been tampering with dimensions, and while attempting to create a
"horizontal" or "vertical" dimension I've hit a nasty problem.

Essentially what I think is happening is that the wrapper is creating an
aligned dimension object instead of a rotated dimension object, and when it
tries to use setRotation() to set the field, it access read-only memory.

Does anyone here know of a workaround, or another way to create a
horizontal/vertical dimension using the .net objectarx wrapper classes?
The dimensions need to stay horizontal/vertical if their grips are moved by
the end-user.

If you want to verify my problem, you can use the attached snip of code, or
you can do the following:

Create a new RotatedDimension object.
Set the 3 points (XLine1Point, XLine2Point, DimLinePoint)
Try to change the rotation.

Thanks in advance
*Tony Tanzillo
Message 6 of 7 (77 Views)

Re: Anyone else with this issue?

02-18-2006 06:42 AM in reply to: jbooth
See the workaround from TP (posted in reply to your post).

That works, because only the default ctor for the
RotatedDimension has the erroneous call to
AcDbAlignedDimension(), but the overload that takes
parameters doesn't, and should work as advertised.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006
http://www.acadxtabs.com

wrote in message news:5090199@discussion.autodesk.com...
That's not good, since I have no idea how to do that (I'm new to the arx library, and am learning via the .NET wrapper classes).

I would hate to resort to COM interop in order to get this done, since I don't know how much longer Autodesk is going to support it. I need to write code using VB so other employees can read and edit it in the future...

Is this an issue that was confirmed by Autodesk? Any idea if it will be fixed in a future patch/release? As long as their dev team knows about it, I'm satisfied. :smileyhappy:
Distinguished Contributor
Posts: 223
Registered: ‎02-17-2006
Message 7 of 7 (77 Views)

Re: Anyone else with this issue?

02-20-2006 08:22 AM in reply to: jbooth
Thank you,

It didn't even occur to me that another constructor call might bypass what was causing my problem.

Thanks again, this will satisfy my needs for the time being.

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Welcome to the new Autodesk Community!
If this is your first visit, click here to get started and make the most of the Community. Let us know what you think of the new experience in the Community Feedback Forum.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community