Xdata from grid

Started by vladgothe, March 28, 2014, 03:12:12 AM

Previous topic - Next topic

vladgothe

In my project, I had a grid in a modal form. I used a button to fetch data from current selected row in grid and assign it as xdata in a polyline. Soon, I realised I need a modeless form, so I remade all the controls for the new form. The problem is that the function which assigned xdata is not working anymore and I don't know why.
Can somebody help me?
I used OpenDCL Studio 8.0.0.4.
This is the project:

Fred Tomke

Hi, I have just not the chance to test but make sure that the control that invokes modifying entities has set event invoke to asynchronously.
Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

vladgothe

I did what you said, but still doesn't work. Maybe it's a bug. When the form was modal, it worked perfectly, but after I changed it with the modeless form, it doesn't work anymore.

owenwengerd

Stating that something "doesn't work" is not very useful for someone to help you solve the problem. What are the exact steps you take, what do you expect to happen, and what actually happens? If there is an error, what is the error message? What have you done to pinpoint the source of the problem? Have you verified that your event handler is called as expected? Have you stepped through the event handler in the debugger to see where it fails?
Owen Wengerd (Outside The Box) / ManuSoft

roy_043

The problem is not related to ODCL at all.
The problem:
Code (autolisp) Select
(setq e (entget obj))
(setq e1 (list (list -3 (list "SIGMA"
  (cons 1000 an) (cons 1000 jud) (cons 1000 bcpi) (cons 1000 nrcerere)   
))))
(append (entget obj) e1)
(entmod (entget obj))

Should be:
Code (autolisp) Select
(setq e (entget obj))
(setq e1 (list (list -3 (list "SIGMA"
  (cons 1000 an) (cons 1000 jud) (cons 1000 bcpi) (cons 1000 nrcerere)   
))))
(entmod (append e e1))


I advise you to improve your coding style:
- Localize variables.
- Indent your code.
- Use more meaningful names for dialog controls.

vladgothe

#5
Thanks, Roy, that was my bad. I posted an older code. The application will not be in english language and I tried to translate it to be readable by others. I modified the code as you wrote, but entmod is not working. Maybe it's my computer's fault.

UPDATE: I forgot to set event invokes to asynchronous. Now it's working properly.
I'm not a programmer, I work as a surveyor, but sometimes I write for myself such applications to ease my work. Thank you for advices!