Author Topic: AcDbDimData::setConstraint  (Read 8192 times)

0 Members and 1 Guest are viewing this topic.

It's Alive!

  • BricsCAD
  • Needs a day job
  • Posts: 6956
  • AKA Daniel
AcDbDimData::setConstraint
« on: June 28, 2010, 09:11:40 AM »
Anyone use AcDbDimData::setConstraint  with a custom object? I'm having a tough time figuring out how to do this properly.  I have two  AcDbDimData objects that can be tabbed though and have their dimensions changed. Once you have modified one of the objects, the object becomes locked, this part is all working. the problems is the entity(Rectangle) size does not get updated.  I can see it flicker but the size does not stick.
just looking for a sample, direction.. I've attached my project if anyone want to play  :laugh:

Thanks

« Last Edit: June 28, 2010, 11:36:54 AM by Daniel »

LE3

  • Guest
Re: AcDbDimData::setConstraint
« Reply #1 on: June 28, 2010, 03:34:34 PM »
have not used that in particular... will have a look into your code, later today.... no idea if I will be of some help :)

hmmm.... what the command doit it is supposed to do? (tried on A2009MEP) it simple draws a box and five grips and that's all... am I missing something? :(

It's Alive!

  • BricsCAD
  • Needs a day job
  • Posts: 6956
  • AKA Daniel
Re: AcDbDimData::setConstraint
« Reply #2 on: June 28, 2010, 07:00:17 PM »
Thanks LE.3
you mean you don't see the DYN grips?

LE3

  • Guest
Re: AcDbDimData::setConstraint
« Reply #3 on: June 28, 2010, 07:20:49 PM »
Thanks LE.3
you mean you don't see the DYN grips?


Si

It's Alive!

  • BricsCAD
  • Needs a day job
  • Posts: 6956
  • AKA Daniel
Re: AcDbDimData::setConstraint
« Reply #4 on: June 28, 2010, 07:25:12 PM »
hmmm is DYN on?

LE3

  • Guest
Re: AcDbDimData::setConstraint
« Reply #5 on: June 28, 2010, 07:26:47 PM »
hmmm is DYN on?
he he.... let me check... don't do any production work or drafting in a long time now (excuse: 10234.178a)  :evil:

LE3

  • Guest
Re: AcDbDimData::setConstraint
« Reply #6 on: June 28, 2010, 07:32:37 PM »
ok... here it is working.

edit: working on arch units - once I change that to decimal... i see the dimension stuck to the changed dim data but not the rectangle...

edit2: I see, now what do you mean... it works in some times both when I click on the tab and type a new dim, and all get updated.
« Last Edit: June 28, 2010, 07:42:14 PM by LE3 »

LE3

  • Guest
Re: AcDbDimData::setConstraint
« Reply #7 on: June 28, 2010, 08:37:19 PM »
never used the dynamic input before, but it is supposed that once you click on the tab after typing a new value it will update the rectangle (or object)? or simple jump to the next available edit box?
and only will do the update if it is click on the enter?

edit: did a quick test on a normal rectangle... and once I use the dyn input, and the tab to change to another editbox, it simple does not update the object with the new value unless I hit enter.

do you want to be able to once you hit on the tab, to grab that value and pass it to your object?....

now I am confused... need a coffee..
« Last Edit: June 28, 2010, 09:09:23 PM by LE3 »

It's Alive!

  • BricsCAD
  • Needs a day job
  • Posts: 6956
  • AKA Daniel
Re: AcDbDimData::setConstraint
« Reply #8 on: June 28, 2010, 09:06:22 PM »
Right, for example with a line, you can tab over to the angle, enter in a value and the line is now constrained at that angle,
you can then tab back to the length and enter a value. This may be an issue with AcDbPolyline as its not behaving as expected either.
 Example, draw a rectangle, get a grip, and adjust the angle, it doesn't stick

It's Alive!

  • BricsCAD
  • Needs a day job
  • Posts: 6956
  • AKA Daniel
Re: AcDbDimData::setConstraint
« Reply #9 on: June 28, 2010, 09:10:07 PM »
BTY, be careful when looking at the Autodesk samples, the AcGrip (in the Grip Sample) class fires off five dangling pointers each time you select a grip  :lol:

LE3

  • Guest
Re: AcDbDimData::setConstraint
« Reply #10 on: June 28, 2010, 09:12:22 PM »
BTY, be careful when looking at the Autodesk samples, the AcGrip (in the Grip Sample) class fires off five dangling pointers each time you select a grip  :lol:
i am aware of that, don't worried.... don't use much the samples et-al   :kewl:

LE3

  • Guest
Re: AcDbDimData::setConstraint
« Reply #11 on: June 28, 2010, 09:16:01 PM »
Right, for example with a line, you can tab over to the angle, enter in a value and the line is now constrained at that angle,
you can then tab back to the length and enter a value. This may be an issue with AcDbPolyline as its not behaving as expected either.
 Example, draw a rectangle, get a grip, and adjust the angle, it doesn't stick

ok, just tried with a single line and the tab works... but no workie on the rectangle, nor in your cobject....

It's Alive!

  • BricsCAD
  • Needs a day job
  • Posts: 6956
  • AKA Daniel
Re: AcDbDimData::setConstraint
« Reply #12 on: June 28, 2010, 09:21:13 PM »
Must be a pline problem
thanks, for your help LE.3.10234.178a
much appreciated

LE3

  • Guest
Re: AcDbDimData::setConstraint
« Reply #13 on: June 28, 2010, 09:23:47 PM »

LE3

  • Guest
Re: AcDbDimData::setConstraint
« Reply #14 on: June 29, 2010, 01:21:18 AM »
did a quick new mickey mouse vs (with v) solution (2008) deriving by an AcDbEntity and adapting your code with some code here and appears that the tab change works in other words does the object update...

will upload it tomorrow land, now it is late for me... time to go to sleep.

1, 2, 3, 4, 5, ... z z z z zzzzzzzzzzzzzz.