Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LISP Routine to Recognize a Pattern of Geometry and Replace with a Block.

3 REPLIES 3
Reply
Message 1 of 4
jonathan_b_thompson
340 Views, 3 Replies

LISP Routine to Recognize a Pattern of Geometry and Replace with a Block.

Good Morning All,

 

I am exporting from Revit to Autocad and finding that my electrical symbols are being exploded on transfer, due to the fact that they are symbols in Revit. I need to create a lisp routine that will seek out pre-defined relationships in geometry i.e. the relationship between the circle and two lines of an outlet symbol, and then replace that group of geometry with the correct outlet symbol block from a predefined library of blocks.

 

I have very limited Lisp skills and under a time cruntch as always. I am trying to learn on the fly but that is slow going. I would be prepared to pay for consulting/development services.

 

My guess is the routine would need to (in the case of the receptacle) seek out all circles of the predefined radius on the particular layer and then decide whether there were intersecting lines of the once again predefined length. If the answer was yes then the routine would proceed to locate the correct block from a symbols library with predefined block names and replace all instances it found. The rotation of the block could be determined by the angle of the lines in relation to the circle.

 

I would need to do the same process for about 20 other block definitions.

 

Any help would be greatly appreciated.

 

Regards

 

JT

3 REPLIES 3
Message 2 of 4

I think lisp can be used to do this, but it seems like maybe it is the long way around the barn. Have you looked into the settings in Revit for exporting to AutoCAD? I used Revit Structure a few years ago and I thnk your symbols can be exported as blocks if you have the settings set correctly. Maybe they cannot if they are just genreric symbols in Revit, but they might be exportable if you convert them into families in Revit first? If you haven't yet, I would research that option first.

 

HTH

Ron

ADN CAD Developer/Operator
Message 3 of 4

Hi Ron

 

Thank-you fro your response. 

 

I have already gone through a pretty extensive exercise of setting up the export function in Revit for the separate disciplines and it is true that family re-creation on the front end may be the best option. Currently we have nested symbols in our electrical families which were created with ease of use in mind - the symbols are controlled by yes/no parameters. These typically export as lines and circles I was hoping to handle this condition in lisp but family recreation my be a mofre simple affair

 

Regards,

JT

Message 4 of 4

If you do find this let me know. I have a very similar problem just using Autocad.

I'm trying to reblock exploded blocks by recognizing objects with similar geometric relationships.

Where I've got multiple exploded valves on a drawing I'd like to be able to quickly reblock them so that I can edit groups of them more easily. For that they need to be blocks. This would save me a world of time and I'd be eternally grateful.

 

A kind of autofind and re-block.

 

Very interested in this feed.

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

Post to forums  

Autodesk Design & Make Report

”Boost