AutoCAD 2013/2014/2015

Reply
Member
alanv
Posts: 5
Registered: ‎01-09-2013
Message 1 of 10 (243 Views)

autolisp

243 Views, 9 Replies
01-09-2013 11:16 AM

we are electrical consultant firm and i would like to make a block where i can insert a lighting fixture etc at different scales and have the lighting type and switch type etc come in. I am not sure how to do this, can someone help me?

*Expert Elite*
rkmcswain
Posts: 3,178
Registered: ‎11-13-2006
Message 2 of 10 (225 Views)

Re: autolisp

01-09-2013 01:09 PM in reply to: alanv

Not quite sure what you are trying to acheive graphically.

Can you post a screenshot of what you want to end up with?

Member
alanv
Posts: 5
Registered: ‎01-09-2013
Message 3 of 10 (218 Views)

Re: autolisp

01-09-2013 01:31 PM in reply to: rkmcswain

we work in 2d so we have 2x4 fixtures. Receptacles etc and all I want to do insert a block and when I insert them on the plan the fixture type would  come and ask what type I would like , also for receptacles. i was looking in the autocad book but you need a micro make this work and i am not sure how to do that.

 

*Expert Elite*
Patchy
Posts: 6,224
Registered: ‎09-16-2009
Message 4 of 10 (200 Views)

Re: autolisp

01-09-2013 09:37 PM in reply to: alanv

It should be easier if you use command ADCENTER, that way you see what the block look like and drag them to your drawing.

*Expert Elite*
M_Hensley
Posts: 1,679
Registered: ‎12-11-2003
Message 5 of 10 (189 Views)

Re: autolisp

01-10-2013 03:46 AM in reply to: alanv

Perhaps a dynamic block with several visibilty states to choose from?

*Expert Elite*
pendean
Posts: 21,879
Registered: ‎11-06-2003
Message 6 of 10 (180 Views)

Re: autolisp

01-10-2013 05:11 AM in reply to: alanv

May I ask, and I'm not being rude: are you, or all of you at the firm, new to AutoCAD?

And are you using plain AutoCAD (where you are posting), or AutoCAD Electrical (designed for your industry with lots of built-in features you would need)? OF AutoCAD MEP version?

 

AutoCAD choices for what you want are:

- Create one block for each type of fixture you need. Each with specs spelled out in the block. Simplest fix.

- Create a generic block (for example, on block for 2x4 lights) but then use visible attributes (text basically) to assign a code to the symbol (for example, LIGHTOLIER on one line and HP90xyz on another and so on). Next level of complexity, but still easy to create.

- Create a master DYNAMIC block where you toggle through many views and options to end up with what you desire. Most time consuming but the ultimate solution.

- If you are actually using AutoCAD Electrical, consider asking your peers in that forum instead as that version may already have the tools you want: http://forums.autodesk.com/t5/AutoCAD-Electrical/bd-p/38
AutoCAD MEP forum is at: http://forums.autodesk.com/t5/AutoCAD-MEP/bd-p/61

 

Be more detailed in your posts and responses.

Dean Saadallah Blog | Facebook | Google+ | Twitter | PINS
Mentor
rapidcad
Posts: 188
Registered: ‎05-24-2011
Message 7 of 10 (179 Views)

Re: autolisp

01-10-2013 05:20 AM in reply to: M_Hensley

Have you done any searches here on the forums to see if what you are envisioning has been posted already? I did electrical waaaay back in the late 80's and there were already electrical and lighting libraries being developed back then. Check the default tool palettes that come with AutoCAD for some dynamic lighting blocks - they may not be a good fit, but they could give you some clarity on how to scheme for what will work best for you. If you need help with developing dynamic blocks, I can help some. I will steer you toward learning how to fish rather than fishing for you though! :smileyhappy:

 

Ron

Ronald A. Powell
CAD Developer/Operator
TGW Systems Inc.
Spring Lake, MI
Member
alanv
Posts: 5
Registered: ‎01-09-2013
Message 8 of 10 (138 Views)

Re: autolisp

01-15-2013 06:07 PM in reply to: pendean
No we are not new to autocad. We have our inserts. ( blocks aready made) I just want to able to insert the block for an example a 2x4 fixture, after you insert the lighting fixure in your plan it would promp your what lighting fixture and scale that type to whatever drawing you were working on, i am just looking for short cut rather then inserting the type after. It's a program and am not sure how to make that program. Al
Member
alanv
Posts: 5
Registered: ‎01-09-2013
Message 9 of 10 (138 Views)

Re: autolisp

01-15-2013 06:07 PM in reply to: rapidcad
We have our blocks, long time ago I worked for this other electrical co. and we had our own block for lighting and power, you would insert the block for example a 2x4 lighting fixture and the guy who made the program after you inserted it into the plan it would have a promp asking you what type fixture you wanted scale it down etc. I just don't know how to make that program. Al.
Mentor
rapidcad
Posts: 188
Registered: ‎05-24-2011
Message 10 of 10 (125 Views)

Re: autolisp

01-16-2013 07:10 AM in reply to: alanv

It sounds like the block you were accustomed to might have had attributes (with your AutoCAD settings set to "Prompt upon insertion"). As Dean mentioned, besides containing graphical information, blocks can be created to have "attributes" which are data forms that you might want to attach to the block. These can be invisible or visible, you can set default values, and like I said, the user can be prompted when inserting them too. The insert command is typically run as follows:

  1. Select a block from within the drawing or from a drive,
  2. Select a Coordinate Location to place it
  3. Select a Scale Factor
  4. Select a Rotation Value.

This can be through the INSERT comand using the dialog box or through the -INSERT command using the command prompt. Through menucode or Lisp programming several variations of this can be created. Tool Palettes also offer an easy way to create insertion tools that place your block on the correct layer and rotate or scale it or all three or even more things without writing any customization code. Here'a a screenshot:

Capture.JPG

Ronald A. Powell
CAD Developer/Operator
TGW Systems Inc.
Spring Lake, MI

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community




Connect with AutoCAD

Twitter

Facebook

Blogs

Pinterest

Youtube