Jump to content

Recommended Posts

Posted

I am updating our stadium seating plan but the seats have no numbers on them - is there a way I can enter the seat numbers in one go or maybe a block at a time instead of entering a number on each seat?

 

Appreciate your help as always

Posted

You already have one strike against you. You are using LT. No access to autolisp.

Posted

I have access to the full 2011 package but it's the free student software - could I do it in the full package and revert it back to the LT so it wouldn't have the text around the edges if I need to print anything off? sorry if thats a dumb question!

Posted

Well technically speaking I suppose you could but you would have to be very careful going from the educational version to the commercial version. AutoDesk takes a dim view of content being created in one and used in the other.

 

The other half of the problem is finding a lisp routine that would auto-number these seats. Were the seats created with attributed blocks?

Posted

Some were and some were not - should I post the file to see if that would help?

Posted

Sure. Strip out anything you don't need us to see and save it down to a 2000 or 2004 file format so more people can have a chance to view it if this presents no problems.

Posted (edited)

A bit out there can't remember but if LT will allow a script, create your seat block with seat number attribute you know the spacing between seats.

 

Providing seats go in a straight line use UCS OB to set angle of block and 0,0 point go to excell and do the following col1 =insert seatblock col2 = x col3 = , col4=y col5 = space col 6=seat number etc you may need a couple of extra spaces to make it work, export it out of excell or cut paste to notepad to make script.

 

insert seatblock 0,0 223

insert seatblock 10,0 224

insert seatblock 20,0 225

insert seatblock 30,0 226

 

use excell to keep incrementing seat number.

 

 

Option 2 to try

There was a neat way of repeating commands whereby you have a txt file not a script and just cut and paste all the commands in one go may work try this

-insert blockname then cut and paste the attached bit of code It worked for me but in full autocad my blocks went in on angle matching a random line

0,0 1 1 0

10,0 1 1 0

20,0 1 1 0

30,0 1 1 0
ucs w

Edited by BIGAL
option 2
Posted

Sorry not been on to reply had a match at the weekend and had to count some money yesterday - thanks for that BigAl I will give it a go. I am trying to attach the file for to see if it will help but can't seem to find the option to attach the file can anyone help blind old me??

Posted

You dont attach the file just make a txt file and then use copy/cut and paste, I have suggested using excel its a bit quicker for the maths save as a txt file you may need an edit to get the txt file looking like above replace spaces etc with one space and you can change seat number and remake txt file. copy the text from here and paste straight into autocad at the right moment. I normally open notepad and paste there and can save it for further use.

 

If the txt cut paste works for you in LT it did for me in full acad and you have MS word you can write a macro that changes the seat number its macro's are done in VBA, using record macro writes code as a start something like go to end of line backspace 2 enter new seat number go down 3 lines redo again enter new seat number. once you get the txt to work paste it here as spaces and new lines are critical as these mean press enter key. And I will have a look at a MS word macro.

 

should have been including seat number single attribute if more attributes then more enters required
0,0 1 1 0 1

10,0 1 1 0 2

20,0 1 1 0 3 and so on

Posted

I meant post the file on here BigAl to see if it would help

 

All the seats are not in big block sections because the person who drafted the drawing in the first place put loads of little blocks in made up of some blocks that have 24 seats right the way down to 4seats would this make a difference?

Posted

wow that sounds like a mess. is each seat within these blocks a block itself, all with the same name? as in - is every seat in your drawing the same single block (regardless of whether it is nested in others)?

 

there is a button for attachments in advanced editing

Posted

There are some seats on their own but some seats are in blocks of 24 etc - it would be better if you guys could see it to understand it!!! it is a mess!!

 

I have tried attaching it on here but the file is to big and I have tried to zip it but it is still too big! any suggestions??

Posted

suggest deleting out all the stuff that's not important to your problem and attaching it here - someone will help i'm sure

Posted (edited)

Is it a problem if each seat is an individual seat ? Again see this option works with LT just cut and paste this example block is called "aaaa" one attribute only important for LT users if it works read on about programing MS word to run within LT for some tasks

 

TXT file to test

-insert
aaaa
0,0 1 1 0
1


10,0 1 1 0
2

20,0 1 1 0
3

30,0 1 1 0
4

40,0 1 1 0
5

50,0 1 1 0
6

60,0 1 1 0
72

70,0 1 1 0
82

 

Just for others here is a direct copy from word of the recorded macro plus a couple of extra lines x = x+1. There is no reason why I could not have just wrote pure code and start with a blank sheet and just write the txt file with number of seats required and start with what seat number.

 

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 2/17/2011 by Alan
Dim x As Integer
x = 1
   Selection.MoveUp Unit:=wdLine, Count:=19
   Selection.MoveLeft Unit:=wdCharacter, Count:=10
   Selection.MoveDown Unit:=wdLine, Count:=3
   Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
   Selection.Delete Unit:=wdCharacter, Count:=1
   textans = x
   Selection.TypeText Text:=x
   Selection.MoveDown Unit:=wdLine, Count:=4
   Selection.MoveLeft Unit:=wdCharacter, Count:=1
   Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
   Selection.Delete Unit:=wdCharacter, Count:=1
   x = x + 1
   Selection.TypeText Text:=x
   Selection.MoveDown Unit:=wdLine, Count:=4
   Selection.MoveLeft Unit:=wdCharacter, Count:=1
   Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
   Selection.Delete Unit:=wdCharacter, Count:=1
  x = x + 1
  Selection.TypeText Text:=x
   Selection.MoveDown Unit:=wdLine, Count:=4
   Selection.MoveLeft Unit:=wdCharacter, Count:=3
   Selection.MoveRight Unit:=wdCharacter, Count:=2
   Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
   Selection.Delete Unit:=wdCharacter, Count:=1
     x = x + 1
     Selection.TypeText Text:=x
End Sub

Edited by BIGAL

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...