Search the Community
Showing results for tags 'block position'.
Found 3 results
Pugazh posted a topic in AutoLISP, Visual LISP & DCLHi, i need this block point. please see attached file.
I have an idea for scheduling our plant’s production but I don’t know if it is possible. I would like have your input. We use AutoCAD 2011 and AutoCAD LT 2011. We also use Office 2010. I have some experience with Visual Basic. Here is the problem: We use Excel to schedule production of items in our plant. There are several workstations that produce several items each day. Presently, this activity is organized in a spreadsheet. This spreadsheet is manually updated maybe 2-3 times a day to reflect many variables that affect production. The data for this spreadsheet originates in the engineering department. This data is entered once in engineering for their use. Then again by the plant scheduler for his scheduling use. Then again by the plant scheduler to update our production database once the item is produced. I want to stop the insanity by entering the data once then using it many times as required. Concept of a solution: In AutoCAD, define a custom coordinate grid with days along the x-axis and the workstation numbers along the y-axis. Then, to represent each item to be produced, define blocks that would hold data from a linked Access database and production information (time/workstation, x /y from the AutoCAD file. When item data is updated in the database it would be reflected in the schedule. When the production data and location is changed in the AutoCAD it would be seen in the database. The scheduler could reposition the blocks in the AutoCAD file as needed to change the schedule. I really have no idea if this is possible. The idea came to me during my commute home one day last week. Thanks in advance for your comments.
What is wrong in the code? I am trying to set the Z position value to zero for all the blocks in the drawing; (defun c:B0() (setq myFilter(list (cons 0 "INSERT"))) (setq ss (ssget "_X" myFilter)) (setq l (sslength ss)) (setq i 0) (Repeat l (setq blk (ssname ss i)) (setq DXF (entget (car blk))) (setq IP (cadr (assoc 0 dxf))) (setq NewIP (subst "0" (caddr IP) IP)) (setq NewDXF (subst NewIP IP DXF)) (entmod NewDXF) ) )