.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Anyone else with this issue?

6 REPLIES 6
Reply
Message 1 of 7
jbooth
447 Views, 6 Replies

Anyone else with this issue?

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
6 REPLIES 6
Message 2 of 7
Anonymous
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
Message 3 of 7
jbooth
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. 🙂
Message 4 of 7
Anonymous
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. 🙂
Message 5 of 7
Anonymous
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
Message 6 of 7
Anonymous
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. 🙂
Message 7 of 7
jbooth
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.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost