Community
AutoCAD LT Forum
Welcome to Autodesk’s AutoCAD LT Forums. Share your knowledge, ask questions, and explore popular AutoCAD LT topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Numbering disappeared from Block

32 REPLIES 32
Reply
Message 1 of 33
geodataEKHBX
1128 Views, 32 Replies

Numbering disappeared from Block

Hi,

 

I have just switched computers and re-downloaded AutoCAD Lt 2020 and I am currently trying to set back up my macros for creating blocks.

 

I am using the following two macros to create a 4 meter diameter circle with numbers ascending accordingly:

 

I usually click on this one first and input the number I would like the block to start with:

 

^C^C_setenv;index1;\_setvar;userr1;\

 

followed by this one that creates the block:

 

*^C^C_-insert;"UXO Surveys";\1;;;$M=$(getvar,USERR1);setvar;USERR1;$M=$(+,$(getvar,USERR1),1)

 

However, since adding this to the Quick Access Toolbar, the first macro works fine but the block does not show the number?

 

I have included a screenshot showing these blocks and the blue square in the first circle indicates where the number usually goes. If I was to start at 1, the next circle would be 2 and the following 3 and so forth.

 

I have checked the Attribute Definitions and nothing is checked. I have also tried checking 'Constant' and 'Preset' of which neither of these made a difference. 

 

If someone can help with this, I would be greatly appreciated.

 

Thanks,

C

 

32 REPLIES 32
Message 2 of 33
pendean
in reply to: geodataEKHBX

Share with us your DWG file with your block in it please.
Message 3 of 33
steven-g
in reply to: geodataEKHBX

The problem is possibly within your block, but if it is the same block as previously then it could also be the text size of the attributes. If you select a block do the attributes have a value in the properties manager?

Message 4 of 33
geodataEKHBX
in reply to: pendean

Hi,

 

Apologies, please find attached the .dwg with the block.

 

Now every time i create a block 'Edit Attributes' pops up to enter in the number manually. Prior to this I used to just be able to click and the numbers would change accordingly.

 

If you require anything else then please just let me know.

 

Thanks,

C

Message 5 of 33
geodataEKHBX
in reply to: steven-g

Hi,

 

I have tried changing the size but this doesn't appear to be the problem.

 

When clicking Ctrl+F2 it says that it is acknowledging the number that should be showing but doesn't show. 'Edit Attributes' now pops up on each block prompting me to put in the number manually.

 

Prior to this I just input the blocks and the numbers appeared within the circle and ascended accordingly. I have uploaded the .dwg here.

 

Thanks,

C

Message 6 of 33
steven-g
in reply to: geodataEKHBX

number.jpgThis is what I see when I open your drawing?

Message 7 of 33
steven-g
in reply to: steven-g

Testing your macro it looks like you need to change the variable 'attdia=0' and alter your macro slightly

*^C^C_-insert;"UXO Surveys";\1;;$M=$(getvar,USERR1);setvar;USERR1;$M=$(+,$(getvar,USERR1),1)

 There only needs to be two ";;" semicolons shown in red above (you have 3)

Message 8 of 33
vinodkl
in reply to: geodataEKHBX

Hi,

 

I figured out what is causing this. Set the system variable "ATTREQ" to "0". Does your macro work better now?

--------------------------------------------------------------------------------------------------------------------------
ವಿನೋದ್ ಕೆ ಎಲ್( System Design Engineer)



Likes is much appreciated if the information I have shared is helpful to you and/or others.

Please mark "Accept as Solution" if my reply resolves the issue or answers your question, to help others in the community.
--------------------------------------------------------------------------------------------------------------------------
Message 9 of 33
geodataEKHBX
in reply to: steven-g

Hi,

 

Apologies for the delayed reply.

 

Thank you for getting back to me - I have tried the below with using only the 2 semi colons and even though the block appears it still prompts me to put in the number. Do you have any other possible suggestions? I'm really stuck with this.

 

Thank you in advance.

 

C

Message 10 of 33
geodataEKHBX
in reply to: vinodkl

Hi,

 

Apologies for the delayed response. Thank you for getting back to me. I have changed the ATTREQ to 0 and now the block shows without the prompt, however the number doesn't.

 

When clicking on the block it acknowledges where the number should be but doesn't display? Do you have any other suggestions that I could possibly try please as I am rather stuck with this one.

 

Thank you in advance.

 

Kind regards,

C

Message 11 of 33
cadffm
in reply to: geodataEKHBX

It's pretty simple, but we can not see what you doing and you don't show it to us.

 

ATTDIA=0 because you don't want a Dialogwindow

ATTREQ=1 because you like to input an attribut vallue

Attdisp is 1 in the uploaded drawing, the attributdefinition is set to visible, all looks good.

The Macro about (only two semicolons) should work if you open your own uploaded file (Block Test.dwg)

 

If not, let us see what you can see.

Set userr1 to 1 or 5 or whatever.

Press 5x [ESC]

Start the macro end insert 3 blockreferences, then Cancel.

Copy the log [F2] from the 5x Cancel to the end and upload it here.

Sebastian

EESignature

Message 12 of 33
geodataEKHBX
in reply to: cadffm

Hi,

 

Thank you for your reply, I have attached the .dwg and done as instructed. Please see the log below:

 

pening an AutoCAD LT 2018/AutoCAD 2018 format file.
Regenerating model.
*Cancel*
Command:
Autodesk DWG. This file is a TrustedDWG last saved by an Autodesk application or Autodesk licensed application.
Command:
Command:
Command:
Command: _setenv
Enter variable name: index1
Value <1>:
Command: _setvar
Enter variable name or [?]: userr1
Enter new value for USERR1 <6.0000>: 1
Command: *Cancel*
Command: *Cancel*
Command: *Cancel*
Command: *Cancel*
Command: *Cancel*
Command:
Command:
Command: _-insert
Enter block name or [?]: "UXO Surveys"
Units: Millimeters Conversion: 1.0000
Specify insertion point or [Basepoint/Scale/Rotate]: Specify scale factor <1>: 1
Specify rotation angle <0>:
Command: 1
Unknown command "1". Press F1 for help.
Command: setvar
Enter variable name or [?] <USERR1>: USERR1
Enter new value for USERR1 <1.0000>: 2
Command:
Command:
Command: _-insert
Enter block name or [?] <UXO Surveys>: "UXO Surveys"
Units: Millimeters Conversion: 1.0000
Specify insertion point or [Basepoint/Scale/Rotate]: Specify scale factor <1>: 1
Specify rotation angle <0>:
Command: 2
Unknown command "2". Press F1 for help.
Command: setvar
Enter variable name or [?] <USERR1>: USERR1
Enter new value for USERR1 <2.0000>: 3
Command:
Command:
Command: _-insert
Enter block name or [?] <UXO Surveys>: "UXO Surveys"
Units: Millimeters Conversion: 1.0000
Specify insertion point or [Basepoint/Scale/Rotate]: Specify scale factor <1>: 1
Specify rotation angle <0>:
Command: 3
Unknown command "3". Press F1 for help.
Command: setvar
Enter variable name or [?] <USERR1>: USERR1
Enter new value for USERR1 <3.0000>: 4
Command:
Command:
Command: _-insert
Enter block name or [?] <UXO Surveys>: "UXO Surveys"
Units: Millimeters Conversion: 1.0000
Specify insertion point or [Basepoint/Scale/Rotate]: *Cancel*

 

Thank you for your help with this. Does the above show anything that I should change?

 

Kind regards,

C

Message 13 of 33
steven-g
in reply to: geodataEKHBX


@geodataEKHBX wrote:

Hi,

 

Thank you for your reply, I have attached the .dwg and done as instructed. Please see the log below:

 

pening an AutoCAD LT 2018/AutoCAD 2018 format file.
Regenerating model.
*Cancel*
Command:
Autodesk DWG. This file is a TrustedDWG last saved by an Autodesk application or Autodesk licensed application.
Command:
Command:
Command:
Command: _setenv
Enter variable name: index1
Value <1>:
Command: _setvar
Enter variable name or [?]: userr1
Enter new value for USERR1 <6.0000>: 1
Command: *Cancel*
Command: *Cancel*
Command: *Cancel*
Command: *Cancel*
Command: *Cancel*
Command:
Command:
Command: _-insert
Enter block name or [?]: "UXO Surveys"
Units: Millimeters Conversion: 1.0000
Specify insertion point or [Basepoint/Scale/Rotate]: Specify scale factor <1>: 1
Specify rotation angle <0>:
Command: 1
Unknown command "1". Press F1 for help.


This is your problem, the macro gets to here and then breaks, and once broken it tries to continue but now using all the wrong order of instructions. You still need to remove one of the commas in your script as mentioned above, the extra comma is telling the macro to repeat the last used input which was the '1' from before.

Message 14 of 33
geodataEKHBX
in reply to: steven-g

Hi,

 

I updated the macro as advised previously to: 

*^C^C_-insert;"UXO Surveys";\1;;$M=$(getvar,USERR1);setvar;USERR1;$M=$(+,$(getvar,USERR1),1)

 

but this still does not work, I have even tried removing the 2nd semi colon but with no luck - is there anything else I can try?

 

Thank you,

 

C

Message 15 of 33
steven-g
in reply to: geodataEKHBX

Show us the new command history with the updated macro, that shows us where the problems are very clearly.

Message 16 of 33
geodataEKHBX
in reply to: steven-g

Command: *Cancel*
Command: *Cancel*
Command: *Cancel*
Command: *Cancel*
Command: *Cancel*
Command:
Command:
Command: _-insert
Enter block name or [?]: "UXO Surveys"
Units: Millimeters Conversion: 1.0000
Specify insertion point or [Basepoint/Scale/Rotate]: Specify scale factor <1>: 1
Specify rotation angle <0>:
Command: 1
Unknown command "1". Press F1 for help.
Command: setvar
Enter variable name or [?] <USERR1>: USERR1
Enter new value for USERR1 <1.0000>: 2
Command:
Command:
Command: _-insert
Enter block name or [?] <UXO Surveys>: "UXO Surveys"
Units: Millimeters Conversion: 1.0000
Specify insertion point or [Basepoint/Scale/Rotate]: Specify scale factor <1>: 1
Specify rotation angle <0>:
Command: 2
Unknown command "2". Press F1 for help.
Command: setvar
Enter variable name or [?] <USERR1>: USERR1
Enter new value for USERR1 <2.0000>: 3
Command:
Command:
Command: _-insert
Enter block name or [?] <UXO Surveys>: "UXO Surveys"
Units: Millimeters Conversion: 1.0000
Specify insertion point or [Basepoint/Scale/Rotate]: Specify scale factor <1>: 1
Specify rotation angle <0>:
Command: 3
Unknown command "3". Press F1 for help.
Command: setvar
Enter variable name or [?] <USERR1>: USERR1
Enter new value for USERR1 <3.0000>: 4
Command:
Command:
Command: _-insert
Enter block name or [?] <UXO Surveys>: "UXO Surveys"
Units: Millimeters Conversion: 1.0000
Specify insertion point or [Basepoint/Scale/Rotate]: *Cancel*

 

Please see the above log from doing this again with the updated macro.

 

Thanks,

C

Message 17 of 33
pendean
in reply to: geodataEKHBX

What does "doesn't work" mean? Your macro in your supplied file works fine here in LT2020 for me, no issues.

 

Capture.PNG 

 

Capture.PNG

Message 18 of 33
geodataEKHBX
in reply to: pendean

Hi,

 

Is there a setting I am missing then as the numbers do not show up on the model space. The block acknowledges where the text should be but it is not visible. The 'invisable' setting is turned off. I have attached screenshots to show how it is displaying.

 

thanks,

C

 

 

Message 19 of 33
steven-g
in reply to: geodataEKHBX

The macro you are using is still throwing errors when it is trying to place the numbers, AutoCAD is seeing that as a command, which tells me you maybe have a space somewhere in the macro which is why you should always use a comma in macro's. Open your macro in plain notepad save it with an extension of .txt and post it here see if we can find the problem there.

This is why you are getting the circles but not the numbers, your macro never places them.

Message 20 of 33
pendean
in reply to: steven-g

@steven-g I copy/pasted from message #14 into the macro line in CUI at a test button I have, seems to be working just fine.

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

Post to forums  

Forma Design Contest


Technology Administrators