CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products [www.cadforum.cz] ARKANCE | CONTACT - CZ | SK | EN | DE
Over 1.092.000 registered users (EN+CZ). AutoCAD tips, Inventor tips, Revit tips. Try the new precise Engineering calculator. New AutoCAD 2026 commands and variables.
Plex.Earth connects AutoCAD and Google Earth
RSS channel - CAD tips RSS tips
RSS discussions

Discussion Discussion forum

?
CAD discussions, advices, exchange of experience

CAD Forum - Homepage CAD discussion forum - ask any CAD-related questions here, share your CAD knowledge on AutoCAD, Inventor, Revit and other Autodesk software with your peers from all over the world. To start a new topic, choose an appropriate forum.

Please abide by the rules of this forum.
This is a peer-to-peer forum. The forum doesn't replace the official direct technical support provided by ARKANCE for its customers.
How to post questions: register or login, go to the specific forum and click the NEW TOPIC button.
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Topic Closedautolisp and browsing block

 Post Reply Post Reply Page  12>
Author
ademontis View Drop Down
Newbie
Newbie


Joined: 02.Apr.2014
Location: Italy
Using: autocad 2012
Status: Offline
Points: 4
Direct Link To This Post Topic: autolisp and browsing block
    Posted: 02.Apr.2014 at 14:58
Hi everybody,
I have an autolisp written for Autocad 2008 on which i have used it for about 2 years without any problems...
it is a lisp that browses for a block and inserts it on a pline, breaking it in the 2 contact points.
The problem is... i now have loaded it on Autocad 2012 and when launched it doesn't open the 'Browse' window that normally opens when i give the command "Insert" manually.
So i cannot select the block to be inserted.
Any idea of what the problem could be? 
I attached the autolisp to the thread
Thanks alot
Alex

Back to Top
Kent Cooper View Drop Down
Senior Member
Senior Member


Joined: 12.Mar.2013
Location: United States
Using: AutoCAD2020, 2023
Status: Offline
Points: 685
Direct Link To This Post Posted: 02.Apr.2014 at 15:44
It looks to me as though you have several things commented out (with initial semicolons) that you shouldn't.  The only thing not commented out that sets the 'block' variable seems to be a User selection of a Block insertion, rather than a chance to navigate to find a drawing.  I think you need to relocate some leading semicolons to get the right parts of it working for you.
Back to Top
rs_higgins View Drop Down
Groupie
Groupie


Joined: 03.Dec.2013
Location: United States
Using: AutoCad 7-2020, SW 14, PRO-E died
Status: Offline
Points: 75
Direct Link To This Post Posted: 02.Apr.2014 at 23:06
Not sure what you are doing with this but if you give me a step by step a I should be able to correct it.
It seem some steps are out of order and we an open parentheses.
It looks like it was brought form an encrypted file that read it incorrectly.
If so it may help to have that file.
But here is a start just a quick clean up.
uploads/427067/insbreak.lsp


Edited by rs_higgins - 02.Apr.2014 at 23:12
Back to Top
dylhunter View Drop Down
Newbie
Newbie


Joined: 25.Mar.2014
Location: China
Using: AutoCAD2010
Status: Offline
Points: 10
Direct Link To This Post Posted: 03.Apr.2014 at 00:03
uploads/457050/insbreak1.lsp
 
I had updated the program. It's OK now. You can select a block on drawing, then break a line. Alos, you can select a block from files, then insert it, then break a line.
Back to Top
dylhunter View Drop Down
Newbie
Newbie


Joined: 25.Mar.2014
Location: China
Using: AutoCAD2010
Status: Offline
Points: 10
Direct Link To This Post Posted: 03.Apr.2014 at 00:12
remember to change the path "C:/public/block/" to your path.
Back to Top
dylhunter View Drop Down
Newbie
Newbie


Joined: 25.Mar.2014
Location: China
Using: AutoCAD2010
Status: Offline
Points: 10
Direct Link To This Post Posted: 03.Apr.2014 at 01:02
This program just run for horizontal and vertical lines perfectly. It's not good for diagonal line. It need be upgraded.
Back to Top
ademontis View Drop Down
Newbie
Newbie


Joined: 02.Apr.2014
Location: Italy
Using: autocad 2012
Status: Offline
Points: 4
Direct Link To This Post Posted: 03.Apr.2014 at 07:51
Thank you everyone...
the lisp used to work on autoCAD2008 with windowsXP 32bit, now we have autocad 2012 on windows7 64bit in the company i was wondering whether it could depend on that or on changes in the autolisp between the 2 version.
It was a lisp i found on a autolisp forum for drafters and it seems that if i change the 'insert' commad to 'ddinsert' it opens the filedialog to look for the blocks but then it doesn't insert it.
Associated to it there is a macro (sorry i forgot on the first post) that is: ^C^C_insert;\ins;\\\

Today i will try and apply your directions, hope they help. Thank you so far.
Alex


Back to Top
John Connor View Drop Down
Senior Member
Senior Member


Joined: 01.Feb.2011
Location: United States
Using: AutoCAD 2018
Status: Offline
Points: 7175
Direct Link To This Post Posted: 03.Apr.2014 at 11:17
The fact that it doesn't work has nothing to do with whether you are running the code on a 32-bit or 64-bit machine nor does it have anything to do with the OS you are running.
"Humans have a strength that cannot be measured. This is John Connor. If you are reading this, you are the resistance."

<<AutoCAD 2015>>

Back to Top
ademontis View Drop Down
Newbie
Newbie


Joined: 02.Apr.2014
Location: Italy
Using: autocad 2012
Status: Offline
Points: 4
Direct Link To This Post Posted: 03.Apr.2014 at 11:17
Originally posted by dylhunter dylhunter wrote:

uploads/457050/insbreak1.lsp
 
I had updated the program. It's OK now. You can select a block on drawing, then break a line. Alos, you can select a block from files, then insert it, then break a line.

when i load it i get this message:

Command: ; error: LOAD failed: "acadappp.lsp"


Back to Top
John Connor View Drop Down
Senior Member
Senior Member


Joined: 01.Feb.2011
Location: United States
Using: AutoCAD 2018
Status: Offline
Points: 7175
Direct Link To This Post Posted: 03.Apr.2014 at 15:16
I tested the routine using 2014 and it worked.  I did not get a load failed error.
"Humans have a strength that cannot be measured. This is John Connor. If you are reading this, you are the resistance."

<<AutoCAD 2015>>

Back to Top

Related CAD tips:


 Post Reply Post Reply Page  12>
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0,212 seconds.