Lee Mac Posted November 19, 2010 Author Share Posted November 19, 2010 Thanks. Ok, so from your error I'm guessing that: (cdr (assoc 70 (tblsearch "BLOCK" <BlockName>))) Is nil. I'm not sure why this should be, as the block should always have a group 70 DXF value - are you using any 'special' blocks (non-standard)? As a quick fix, change: (if (zerop (logand 45 (cdr (assoc 70 (tblsearch "BLOCK" (setq n (BlockName obj))))))) (setq l (assoc++ n l)) ) to: (if (setq n (BlockName obj)) (setq l (assoc++ n l)) ) Quote Link to comment Share on other sites More sharing options...
piscopatos Posted November 20, 2010 Share Posted November 20, 2010 i tried this quick fix, it doesnt give nill anymore but table comes back empty. i dont know whether i got non standard block or not but if there is i guess those non standard blocks might have come when i installed autocad mep. thanks for your effort lee, u r a bless to this comunity Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted November 20, 2010 Author Share Posted November 20, 2010 Thanks Piscopatos Now I'm slightly stumped as to what is causing the problem... Quote Link to comment Share on other sites More sharing options...
Kat Posted November 22, 2010 Share Posted November 22, 2010 Lee- This lisp is awesome!! The previews are great, this will help with some basic estimating too!! Keep up the great work! I sure have a lot of learning to do when it comes to this stuff! Kat Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted November 22, 2010 Author Share Posted November 22, 2010 Lee- This lisp is awesome!! The previews are great, this will help with some basic estimating too!! Keep up the great work! I sure have a lot of learning to do when it comes to this stuff! Kat Many thanks Kat, I'm glad you like it Lee Quote Link to comment Share on other sites More sharing options...
sharpooth Posted November 22, 2010 Share Posted November 22, 2010 Hi Lee, you are the best! The code is amazing! Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted November 22, 2010 Author Share Posted November 22, 2010 Hi Lee, you are the best!The code is amazing! Thanks Sharpooth Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted November 26, 2010 Author Share Posted November 26, 2010 Code is now here, with a new GIF for you all to enjoy! Quote Link to comment Share on other sites More sharing options...
autolisp Posted December 20, 2010 Share Posted December 20, 2010 Dear Sir, Some Error on lisp please chk See Attched file Command: ap APPLOAD CountV1-2.lsp successfully loaded. Command: ø¤º°`°º¤ø Count.lsp ~ Copyright © by Lee McDonnell ø¤º°`°º¤ø ~¤~ ...Type "Count" to Invoke... ~¤~ Command: Command: count Select Blocks to Count <All> : Block Name..............................|...Count ----------------------------------------|-------- Tree-Jambhul............................|.......1 Tree-Piple..............................|.......2 Tree-Umber..............................|.......1 Tree-Wadh...............................|.......1 rpole...................................|.......1 t15b....................................|.......2 ----------------------------------------|-------- Table? [Yes/No/Settings] <Yes> : ** Error: no function definition: nil ** Tree Inventary 16-12-2010.zip Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted December 20, 2010 Author Share Posted December 20, 2010 This is the first time such a bug has been reported - could you identify in the VLIDE on which line the code crashes? To do such, type VLIDE at the AutoCAD command line, then: Open my program (Ctrl+O) Debug > Break on Error (ticked) Load my program (Ctrl+Alt+E) In AutoCAD: Run the program 'til it crashes In VLIDE: Debug > Last Break Source Copy/Paste the highlighted code segment here along with the relevant error message. Reset the Error (Ctrl+R) Untick the Break on Error (if desired). Lee Quote Link to comment Share on other sites More sharing options...
autolisp Posted December 20, 2010 Share Posted December 20, 2010 This is the first time such a bug has been reported - could you identify in the VLIDE on which line the code crashes? To do such, type VLIDE at the AutoCAD command line, then: Open my program (Ctrl+O) Debug > Break on Error (ticked) Load my program (Ctrl+Alt+E) In AutoCAD: Run the program 'til it crashes In VLIDE: Debug > Last Break Source Copy/Paste the highlighted code segment here along with the relevant error message. Reset the Error (Ctrl+R) Untick the Break on Error (if desired). Lee Dear Sir, below Line error ( (if (is64Bit) vla-SetBlockTableRecordId32 vla-SetBlockTableRecordID2 ) tObj row 0 acBlockCell (GetObjectID (Itemp blks block) doc) t ) ** Error: no function definition: nil ** Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted December 20, 2010 Author Share Posted December 20, 2010 Ok, I would assume that the vla-SetBlockTableRecordID2 function perhaps doesn't exist in ACAD 2006 (the version displayed on your profile). I'll look to update the code in future, but for now, try changing: vla-SetBlockTableRecordID2 to vla-SetBlockTableRecordID Lee Quote Link to comment Share on other sites More sharing options...
autolisp Posted December 20, 2010 Share Posted December 20, 2010 Ok, I would assume that the vla-SetBlockTableRecordID2 function perhaps doesn't exist in ACAD 2006 (the version displayed on your profile). I'll look to update the code in future, but for now, try changing: vla-SetBlockTableRecordID2 to vla-SetBlockTableRecordID Lee Dear Sir, Update code but some error error on same line ( (if (is64Bit) vla-SetBlockTableRecordId32 vla-SetBlockTableRecordID ) tObj row 0 acBlockCell (GetObjectID (Itemp blks block) doc) t ) ** Error: Too many actual parameters ** Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted December 20, 2010 Author Share Posted December 20, 2010 Oops! Also remove: acBlockCell Quote Link to comment Share on other sites More sharing options...
autolisp Posted December 20, 2010 Share Posted December 20, 2010 De oops! Also remove: acblockcell dear sir, its done thx for help & sharing Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted December 20, 2010 Author Share Posted December 20, 2010 dear sir,its done thx for help & sharing So it works now? Quote Link to comment Share on other sites More sharing options...
autolisp Posted December 20, 2010 Share Posted December 20, 2010 so it works now? dear sir, yes it's work Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted December 20, 2010 Author Share Posted December 20, 2010 dear sir, yes it's work Excellent - great to hear Quote Link to comment Share on other sites More sharing options...
markv Posted December 23, 2010 Share Posted December 23, 2010 that is very nice. how about the ability to count the view states of a dynamic block? Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted December 24, 2010 Author Share Posted December 24, 2010 that is very nice. how about the ability to count the view states of a dynamic block? Thanks Mark, I think that question about dynamic blocks has been asked in the past - I could look through the Dynamic Block properties of the block but how does one determine which dynamic properties are view states? I need more experience with dynamic block manipulation really Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.