Jump to content

Recommended Posts

Posted

Hello,

I have a block named "A". I can copy this block in a defined position and rotation with the following code:

(command "-insert" "A" "1,1" 1 1 0)

Many forums say that is also possibile to insert automatically the content of the attribute (NAME) using this code: 

(command "-insert" "A" "1,1" 1 1 0 "cir")

In this case the attribute is NAME and its content is cir. 
If i try to run this code, AutoCAD doesn't insert automatically the content, it asks to type it manually, as you can see in the screenshot. How can I solve? 
Thank you!

image.thumb.png.3ea228520a177327356f1e341023e605.png
image.thumb.png.e296b171e9c6b71e51181640ab8341a7.png

Posted

There are 2 variables that control this action ATTREQ & ATTDIA.

ATTREQ will allow or stop input of attributes.

ATTDIA controls the dcl display 

 

You home work is have a look at help, HINT the values are 0 or 1 using (setvar 'ATTREQ x)

  • Like 1
Posted

Oh, never heard of ATTREQ.  This could be useful

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...