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

ERROR when add XData with code "DxfCode.ExtendedDataWorldYDir"

3 REPLIES 3
Reply
Message 1 of 4
bikelink
323 Views, 3 Replies

ERROR when add XData with code "DxfCode.ExtendedDataWorldYDir"

I've tried to add some xdata ...and i have a problem with dxfcode "DxfCode.ExtendedDataWorldYDir"


p = new Point3d(Vector3d.XAxis.X, Vector3d.XAxis.Y, Vector3d.XAxis.Z);
// this is ok ... you can add how many do you want...1 or 100...
TypedValue tv = new TypedValue((int)DxfCode.ExtendedDataWorldXDir, p);
buf.Add(p);

{color:#ff0000}// this crash just with one!{color}

p = new Point3d(Vector3d.YAxis.X, Vector3d.YAxis.Y, Vector3d.YAxis.Z);
tv = new TypedValue((int)DxfCode.ExtendedDataWorldYDir, p);
buf.Add(tv);
3 REPLIES 3
Message 2 of 4
Anonymous
in reply to: bikelink


I think that you are only supposed to use the
ExtendedDataWorldXDir for assignment in your code and pass in a 3d
point and Acad will automatically assign the y and z codes for the y and z
components of the point that you pass in with your x code.


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
I've
tried to add some xdata ...and i have a problem with dxfcode
"DxfCode.ExtendedDataWorldYDir"





p = new Point3d(Vector3d.XAxis.X, Vector3d.XAxis.Y, Vector3d.XAxis.Z);

// this is ok ... you can add how many do you want...1 or 100...

TypedValue tv = new TypedValue((int)DxfCode.ExtendedDataWorldXDir, p);

buf.Add(p);


{color:#ff0000}// this crash just with one!{color}

p
= new Point3d(Vector3d.YAxis.X, Vector3d.YAxis.Y, Vector3d.YAxis.Z);
tv =
new TypedValue((int)DxfCode.ExtendedDataWorldYDir,
p);
buf.Add(tv);
Message 3 of 4
Anonymous
in reply to: bikelink


You're misunderstanding the meaning 'Y' and

and 'Z' constants.

 

They aren't used in code, only in DXF files. 

You use only the 'X' constants in code, with

points or vectors.


 

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000
through 2009

href="http://www.acadxtabs.com">http://www.acadxtabs.com

 


 

 


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
I've
tried to add some xdata ...and i have a problem with dxfcode
"DxfCode.ExtendedDataWorldYDir"





p = new Point3d(Vector3d.XAxis.X, Vector3d.XAxis.Y, Vector3d.XAxis.Z);

// this is ok ... you can add how many do you want...1 or 100...

TypedValue tv = new TypedValue((int)DxfCode.ExtendedDataWorldXDir, p);

buf.Add(p);


{color:#ff0000}// this crash just with one!{color}

p
= new Point3d(Vector3d.YAxis.X, Vector3d.YAxis.Y, Vector3d.YAxis.Z);
tv =
new TypedValue((int)DxfCode.ExtendedDataWorldYDir,
p);
buf.Add(tv);
Message 4 of 4
bikelink
in reply to: bikelink

It's all right... I understood the meaning! 😉

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