TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Lupo76 on April 05, 2016, 03:22:52 AM

Title: Add Xdata 1011 and OFFSET command
Post by: Lupo76 on April 05, 2016, 03:22:52 AM
I have added a hd ata 1011 to certain objects.

When I copy one of these objects to another location, the copy contains same xdata, but with the coordinates update to reflect the new location of the copy.

But if I use the command OFFSET, coordinates xdata of the copy are not updated.
I'm wrong something or is a particular behavior as expected so I have to manage by code?
Title: Re: Add Xdata 1011 and OFFSET command
Post by: Marc'Antonio Alessi on April 05, 2016, 05:37:59 AM
Yes, very strange... after Offset 1011 do not update (i.e. after Move), if the object is copied the 1011 is update but starting from wrong previous value...  :blink:
Quote
From help:
World Space Position
1011. Unlike a simple 3D point, the WCS coordinates are moved, scaled, rotated, and mirrored along with the parent entity to which the extended data belongs. The WCS position is also stretched when the STRETCH command is applied to the parent entity and when this point lies within the select window.
Title: Re: Add Xdata 1011 and OFFSET command
Post by: Lee Mac on April 05, 2016, 06:09:24 AM
I believe there are known bugs pertaining to xdata group codes not updating following modification to objects, e.g.:

https://www.theswamp.org/index.php?topic=36249.0
https://forums.autodesk.com/t5/objectarx/xdata-1011-1012-amp-amp-1013-not-updating/td-p/4910994
Title: Re: Add Xdata 1011 and OFFSET command
Post by: Lupo76 on April 05, 2016, 08:57:56 AM
I believe there are known bugs pertaining to xdata group codes not updating following modification to objects, e.g.:

https://www.theswamp.org/index.php?topic=36249.0
https://forums.autodesk.com/t5/objectarx/xdata-1011-1012-amp-amp-1013-not-updating/td-p/4910994

Even BricsCAD V16 has the same behavior :-(
Then confirm that it is planned in this way? absurd!  :x
Title: Re: Add Xdata 1011 and OFFSET command
Post by: Marc'Antonio Alessi on April 05, 2016, 10:51:57 AM
I believe there are known bugs pertaining to xdata group codes not updating following modification to objects, e.g.:

https://www.theswamp.org/index.php?topic=36249.0
https://forums.autodesk.com/t5/objectarx/xdata-1011-1012-amp-amp-1013-not-updating/td-p/4910994
Tested Copy, Mirror, Stretch, Move, Scale with a Line: all is OK (also in A2017).
Only Offset do not update 1011.  :wideeyed:
Title: Re: Add Xdata 1011 and OFFSET command
Post by: roy_043 on April 05, 2016, 03:06:46 PM
@ Lupo76 + Marc'Antonio Alessi:
Offsetting an entity can have varied results. Offsetting a circle will produce a new 'scaled' entity. Should the gc 1011 point be scaled in that case? Or should the position relative to the center (or the 'curve' start point) of the circle remain constant? And what is the most logical approach if offsetting a polyline results in multiple new entities? What behavior do you have in mind?
Title: Re: Add Xdata 1011 and OFFSET command
Post by: Marc'Antonio Alessi on April 06, 2016, 04:23:30 PM
@ Lupo76 + Marc'Antonio Alessi:
Offsetting an entity can have varied results. Offsetting a circle will produce a new 'scaled' entity. Should the gc 1011 point be scaled in that case? Or should the position relative to the center (or the 'curve' start point) of the circle remain constant? And what is the most logical approach if offsetting a polyline results in multiple new entities? What behavior do you have in mind?
I agree, then also I have done the same your reasoning that, probably, justify the not update of cg 1011.   :-)  :yes:
Title: Re: Add Xdata 1011 and OFFSET command
Post by: Lupo76 on April 08, 2016, 03:22:30 AM
@ Lupo76 + Marc'Antonio Alessi:
Offsetting an entity can have varied results. Offsetting a circle will produce a new 'scaled' entity. Should the gc 1011 point be scaled in that case? Or should the position relative to the center (or the 'curve' start point) of the circle remain constant? And what is the most logical approach if offsetting a polyline results in multiple new entities? What behavior do you have in mind?

This is true! Actually had not thought about.
But actually I had solved the problem at the start redefining the OFFSET command, so that when the user selects an object of my application, it only works with linear objects with only 2 vertices ;-)

Quindi ora devo trovare un modo per implementare anche l'aggiornamento dell'xdata 1011 da codice :-(

PS. I put in check "Notify me of replies" in this post, but I do not receive any notification ... you tell me why?
Title: Re: Add Xdata 1011 and OFFSET command
Post by: roy_043 on April 08, 2016, 04:44:18 AM
But actually I had solved the problem at the start redefining the OFFSET command, so that when the user selects an object of my application, it only works with linear objects with only 2 vertices ;-)
It would be nice if you share your solution here:
https://www.theswamp.org/index.php?topic=51177.0
Title: Re: Add Xdata 1011 and OFFSET command
Post by: ChrisCarlson on April 08, 2016, 08:25:37 AM
@ Lupo76 + Marc'Antonio Alessi:
Offsetting an entity can have varied results. Offsetting a circle will produce a new 'scaled' entity. Should the gc 1011 point be scaled in that case? Or should the position relative to the center (or the 'curve' start point) of the circle remain constant? And what is the most logical approach if offsetting a polyline results in multiple new entities? What behavior do you have in mind?

This is true! Actually had not thought about.
But actually I had solved the problem at the start redefining the OFFSET command, so that when the user selects an object of my application, it only works with linear objects with only 2 vertices ;-)

Quindi ora devo trovare un modo per implementare anche l'aggiornamento dell'xdata 1011 da codice :-(

PS. I put in check "Notify me of replies" in this post, but I do not receive any notification ... you tell me why?

Very curious how you wrote your own version of offset without using offset commands.
Title: Re: Add Xdata 1011 and OFFSET command
Post by: Marc'Antonio Alessi on April 08, 2016, 09:33:13 AM
PS. I put in check "Notify me of replies" in this post, but I do not receive any notification ... you tell me why?
I too have the same problem also in other posts!  :-(
Title: Re: Add Xdata 1011 and OFFSET command
Post by: Marc'Antonio Alessi on April 08, 2016, 09:35:03 AM
This is true! Actually had not thought about.
But actually I had solved the problem at the start redefining the OFFSET command, so that when the user selects an object of my application, it only works with linear objects with only 2 vertices ;-)
Quindi ora devo trovare un modo per implementare anche l'aggiornamento dell'xdata 1011 da codice :-(
For a response post your code...