TheSwamp

Code Red => Visual DCL Programming => AutoLISP (Vanilla / Visual) => OpenDCL => Topic started by: Langbolt on May 14, 2021, 08:24:32 AM

Title: Unhandled Exception c0000027 (c0000027h) at address 3f27114dh - AutoCAD 2020
Post by: Langbolt on May 14, 2021, 08:24:32 AM
Not sure why this is happening.....This routine works fine in AutoCAD2013.....but when we upgraded to 2020 we get an Unhandled Exception.

Brief description of program: It Pull/Pushes data from the header block which are stored in the Drawing Props (type DWGPROPS to view)

When we run the program it pulls the data correctly and displays them correctly in the form in the text boxes.

Selecting the cancel button and it closes the form correctly (I did have to change the syntax of the form close from:
(dcl_Form_Close STEPHEADER_HEADER 1) to (dcl-Form-Close STEPHEADER/HEADER 1) .....so it would close the form.

But, the same code doesn't seem to work in the UPDATE button.

Any help would be greatly appreciated

:)

Thanks
John
Title: Re: Unhandled Exception c0000027 (c0000027h) at address 3f27114dh - AutoCAD 2020
Post by: Langbolt on May 14, 2021, 08:28:19 AM
Here's a copy of the Drawing Template......;)

REVISED - Correct & updated Template
Title: Re: Unhandled Exception c0000027 (c0000027h) at address 3f27114dh - AutoCAD 2020
Post by: JohnK on May 14, 2021, 12:18:16 PM
Sorry, I don't know the answer to your problem but I just wanted to welcome you to TheSwamp, Langbolt.
Title: Re: Unhandled Exception c0000027 (c0000027h) at address 3f27114dh - AutoCAD 2020
Post by: Langbolt on May 14, 2021, 01:23:25 PM
Thanks John.....Glad to be here   :-)
Title: Re: Unhandled Exception c0000027 (c0000027h) at address 3f27114dh - AutoCAD 2020
Post by: roy_043 on May 15, 2021, 03:17:24 AM
Maybe the wrong template was attached?
The tag "SHAPE" does not occur in the DWT. Instead I find "STP_SHAPE".
Title: Re: Unhandled Exception c0000027 (c0000027h) at address 3f27114dh - AutoCAD 2020
Post by: Langbolt on May 17, 2021, 11:04:35 AM
Roy_043

In the STEP HEADER block you will find the SHAPE attribute.....type "BEDIT" and choose the STEP HEADER block....then select the attribute beside Shape: (in the lower left corner)

Tag: SHAPE

Prompt: Step Shape

Value: -

And if you type "DWGPROPS" at the command line it will display STEP.SHAPE in the list.

Did you do a search in LISP to find the TAG's in the Drawing ?

Thanks for your help

John



Title: Re: Unhandled Exception c0000027 (c0000027h) at address 3f27114dh - AutoCAD 2020
Post by: roy_043 on May 18, 2021, 02:56:52 AM
Code: [Select]
(mapcar 'vla-get-tagstring (vlax-invoke (vlax-ename->vla-object (car (entsel))) 'getattributes))
=>
("STP_SHAPE" "STP_SIZE" "STP_DESCRIPTION" "STP_TYPE" "STP_PANEL" "STP_PERIMETER" "DRAWNBY" "DRAWNDATE" "STP_REVISION" "DWG")
Title: Re: Unhandled Exception c0000027 (c0000027h) at address 3f27114dh - AutoCAD 2020
Post by: Langbolt on May 18, 2021, 09:40:49 AM
Hi Roy,

That is weird!

When I use your Vlisp code and select the "step header" block this is what I get.

Command: (mapcar 'vla-get-tagstring (vlax-invoke (vlax-ename->vla-object (car (entsel))) 'getattributes))
Select object: ("CUSTOMER" "TAG" "WORKORDER" "SHAPE" "DESCRIPTION" "PTYPE" "DESIGNER" "STYPE" "PHEIGHT" "DRAWNDATE" "REVISION#" "DRAWING")

I found there was an extra block....so I removed it (STEP HEADER B) - it doesn't need to be there.

Also, I think you're right....I think that was the wrong template as I checked the Template File Location in Autocad and it was pointing to the wrong folder.....sorry for the confusion.

Attached is the revised template.

Thank you for your assistance

:)

John
Title: Re: Unhandled Exception c0000027 (c0000027h) at address 3f27114dh - AutoCAD 2020
Post by: roy_043 on May 18, 2021, 11:55:29 AM
There is an issue with using command calls in an ODCL event handler.
See: https://opendcl.com/forum/index.php?topic=2190.0

Try using vla-regen instead or move the command call to the main function as per the advice in the link.
Title: Re: Unhandled Exception c0000027 (c0000027h) at address 3f27114dh - AutoCAD 2020
Post by: Langbolt on May 19, 2021, 09:50:30 AM
Winner Winner! Chicken Dinner!!!!

Thanks Roy!

I replaced:
Code - Auto/Visual Lisp: [Select]
  1. (command "regenall")

with:
Code - Auto/Visual Lisp: [Select]

Works like a dream!!!

 :yay!: :yay!: :yay!: