Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Syntax difference AutoCAD 2012 vs. AutoCAD 2012 Architecture

9 REPLIES 9
SOLVED
Reply
Message 1 of 10
AMC663
668 Views, 9 Replies

Syntax difference AutoCAD 2012 vs. AutoCAD 2012 Architecture

Hi All,

 

I run into an interesting discrepancy.  I have a keynote insert routine that has been working at least from R_2008 on.  It also works in Plain AutoCAD 2012, but not in AutoCAD 2012 Architecture. If I make the change below (second group) it works, but obviously this would make it  hard to switch between the two flavors. Is there another Variable aside from the Attdia and Attreq that would cause this behavior?

 

The original version inserted the leader and the keynote block and opened up the Ddatte dialog box.

 

;;******************************************************

;; AutoCAD 2012 ;; ACADVER = "18.2s (LMS Tech)"

(Command "insert" "KEYNOTE" P4 (* DS) (* DS) "0")

;;---------------------------------------------------------------------------------

;; AutoCAD 2012 Architecture ;; ACADVER = "18.2s (LMS Tech)"

(Command "insert" "KEYNOTE" P4 (* DS) (* DS) "0" "" "") (setq SS1 (ssget "L" )) (command ".ddatte" SS1)

;;******************************************************

 

Thanks in advance,

 

GS

 

9 REPLIES 9
Message 2 of 10
Alfred.NESWADBA
in reply to: AMC663

Hi,

 

you just have set the variables different in your systems, compare

ATTDIA

ATTREQ

set these to the same values and you can run the same LISP-syntax

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 3 of 10
AMC663
in reply to: Alfred.NESWADBA

Thanks, but if ATTDIA  & ATTREQ set to 0 the block inserts correctly, but doesn't prompt to complete the command.

 

In any other AutoCAD you pick two points for the leader and then the block inserts and prompts for editing. The problems should lie somewhere else, either a variable or Lisp syntax. Although why would they change Lisp behavior between similar editions?

 

Thanks,

 

GS

 

Message 4 of 10
Alfred.NESWADBA
in reply to: AMC663

Hi,

 

set both to 1, that will open the dialog for requesting the attribute-values with your first LISP-syntax in both versions (if you have the same block definition in use).

 

>> Although why would they change Lisp behavior between similar editions?

They did not change the LISP-syntax (at least not for your problem), you are dealing with different settings, In AutoCAD you have set both to 1, in ACA you have set at least ATTREQ to 0 .... and that is fully independent from the LISP).

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 5 of 10
AMC663
in reply to: Alfred.NESWADBA

Hi Alfred,

I stand corrected.  Attreq = 0 & Attdia = 1 solved the problem.

Is there any way to identify through Lisp what AutoCAD I am in?  Both the regular and the Architecture version seems to have identical ACADVER values and I have to use both.

ACADVER = "18.2s (LMS Tech)"

Thank you for you help,

GS

Message 6 of 10
Alfred.NESWADBA
in reply to: AMC663

Hi,

 

I'm surprised now! In your first post you wrote:

>> The original version inserted the leader and the keynote block

>> and opened up the Ddatte dialog box.

But if you set now ATTREQ to 0 you won't be asked to input the values for the attributes. ATTREQ = 0 means "don't ask for attributes", look >>>here<<<.

 

>> Is there any way to identify through Lisp what AutoCAD I am in?

I'm a "NIL" in LISP, but you can check the path of your profile in the registry, there you find product- and language-code of the AutoCAD-type that you are currently running.

 

8000 is Civil3D 2010, 407 stands for German

9002 is Map3D 2011

....

 

 

HTH, - alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 7 of 10
AMC663
in reply to: Alfred.NESWADBA

Hi, 

It is the weirdest thing.  Any other versions including plain AutoCAD 2012 I had both Attreq and Attdia set to 1 and this line below inserted the block and it came up for imput.

(Command "insert" "KEYNOTE" P4 (* DS) (* DS) "0")

In AutoCAD 2012 Architecture however, I have to set (on your advice) Attreq to 0 and Attdia to 1.  Go figure.

I’ll ask around, but ACADVER gives identical values in both versions.

I do not how to access the registry through Lisp.

I am really curious why the difference.

Cheers,

GS

 

Message 8 of 10
dgorsman
in reply to: AMC663

Try (vlax-product-key) function - it gives you a partial path in the registry to the currently running AutoCAD product.  You might also use the (arx) function to check to see if the ACA ARX module is loaded, which might be better if there is a "run as AutoCAD" option and you *must* be certain its running ACA.

----------------------------------
If you are going to fly by the seat of your pants, expect friction burns.
"I don't know" is the beginning of knowledge, not the end.


Message 9 of 10
AMC663
in reply to: dgorsman

I have to admit I have to eat crow Alfred.  When I set ATTREQ to 0 the block inserts okay except of course no prompting for input.  I am too harried at work and overlooked the obvious.

And yes Ggorsman I do feel the rug burn :-))  I have no idia what the Architectural version has against ATTREQ 0.

When the ATTREQ is set to 1 the block goes out to the blue yonder and needs 2 returns to settle.  Of course no input prompt then either.

My temp solution works, but it is much slower than the original one.  I'll have to figure this out in time.

Thank you both though,

GS

Message 10 of 10
AMC663
in reply to: AMC663

As it often happens in life, explanations to complex looking conundrums are mundane.  I installed the SP1 service pack that our MIS department in their infinite wisdom decided not to apply during the initial installation.  SP1 solved all my problems.  Well not all.

 

GS

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost