AutoCAD Electrical Forum
Welcome to Autodesk’s AutoCAD Electrical Forums. Share your knowledge, ask questions, and explore popular AutoCAD Electrical topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Problems with Electrical symbols inserted from Custom Palettes

7 REPLIES 7
SOLVED
Reply
Message 1 of 8
Anonymous
584 Views, 7 Replies

Problems with Electrical symbols inserted from Custom Palettes

I would like to create custom tool palettes for our electrical symbols, but have found that if you insert an Electrical symbol from a palette the symbol does not break the wire. If you do a "Move Component" the symbol will then break the wire, but I don't want to have to Move every component after I insert it. We have encountered this same problem when using the Insert - Block command from the toolbar.
Anyone know of a fix for this? It would really improve our productivity to be able to use the palettes.

Thanks,
7 REPLIES 7
Message 2 of 8
rhesusminus
in reply to: Anonymous

You won't be able to achieve what you want using standard insert block
functions.
You'll have to incorporate a lispcommand on each button in your
toolspalette. The command should be like this:

(C:wd_insym2 "VMS1" nil 1 1)

"VMS1" is the block name
"nil" specifies that you should be able to select the insertion point on
screen
"1" is the scale
"1" means that you should get the dialog box for the component after it is
inserted. If you set this to 0, no dialog.

THL

Trond Hasse Lie
AutoCAD Electrical and EPLAN expert
Ctrl Alt El
Please select "Accept Solution" if this post answers your question. 'Likes' won't hurt either. 😉
Message 3 of 8
pjfontes
in reply to: Anonymous

I would like to take this one step further and automatically annotate the inserted symbol upon insertion. Is there an easy way to accomplish this?

Thanks.
Message 4 of 8
pjfontes
in reply to: Anonymous

!!!!

I just stumbled upon a solution.

insert symbol
(setq ent1 (c:wd_insym2 "HPB11" (list 5.0 6.25) nil nil))
modify symbol
(c:wd_modattrval ent1 "DESC1" "HIHI" 0)
Message 5 of 8
userlevel6
in reply to: Anonymous

You MIGHT be looking for something like this? I wrote this code to allow me to create menu items that inserted a schematic symbol and set their MFG and CAT info immediately afterward without me having to browse the catalog for the part. Use/modify as you wish.

Here is the program, a usage sample follows at the end:

;CODE FOR supplying MFG and CAT values to a schematic block
;following insertion. This is a one-shot deal, intended for use in
;the schematic menu, following a call to C:WD_INSYM2, to allow the user to
;specify a schematic symbol and include MFG and CAT data without selecting from the database.
;-James Moore, 11-2-2007

(DEFUN C:SCH_MFG-CAT_AID (MFG CAT / )
(setq TESTBLOCK (entlast))
(setq SELS (entnext TESTBLOCK))

(setq NEWSEL (entnext TESTBLOCK))
(PROGN
(while (not (equal (cdr (assoc 0 (entget NEWSEL))) "SEQEND"))
(if (equal (cdr (assoc 0 (entget NEWSEL))) "ATTRIB")
(progn (setq VALUEB (cdr (assoc 1 (entget NEWSEL))))
(setq NEWVAL (cdr (assoc 2 (entget NEWSEL))))
(if (or (equal NEWVAL "MFG")(equal NEWVAL "CAT"))
(progn(if (eq NEWVAL "MFG")(setq TEST (cons 1 MFG)))(if (eq NEWVAL "CAT")(setq TEST (cons 1 CAT)))
(setq VALUETEST (cons 1 VALUEB))
(setq NEWBLK (subst TEST VALUETEST (entget NEWSEL)))
(entmod NEWBLK)
(entupd (cdr (assoc -1 NEWBLK)))
)
)
(setq NEWSEL (entnext NEWSEL))
)
)
)
(PRINC)
);END PROGN
)



*********************************
After this function is loaded in your ACE enviornment, you may add a Command item in your Electrical Menu, using this function in combination with the built-in WC_INSYM2 function. The sample below I use for an Allen Bradley Ethernet adapter module:

(c:WD_INSYM2 "HIO1_AB_1794-AENT" (getpoint "Select insert point") nil nil)(c:SCH_MFG-CAT_AID "AB" "1794-AENT")(c:wd_pinlist_attach (entlast) 1)

The only drawback I see so far is I'm not addressing any other variables (like RATINGS) that won't be extracted from the database. Because this method bypasses the user making a selection of an item by picking it, data other than MFG and CAT is not copied to the symbol.
Message 6 of 8
GailL
in reply to: rhesusminus

Even tho this is an older topic, I am really wanting to be able to make the tool palette work for electrical symbols.

 

You had mentioned a lispcommand that should go on each button in the tool palette. I will do more research, but could you direct me on where and how to do this?

 

I would like the entire tool palette take on that ability, not just one part at a time. But I am willing to do whatever it takes.

 

Please advise

Thanks!

Gail

Message 7 of 8
rhesusminus
in reply to: GailL

Look in the API Help files for AutoCAD Electrical:

2016-12-02_13-21-50.png


Trond Hasse Lie
AutoCAD Electrical and EPLAN expert
Ctrl Alt El
Please select "Accept Solution" if this post answers your question. 'Likes' won't hurt either. 😉
Message 8 of 8
GailL
in reply to: rhesusminus

Thank you so much for your direction. Actually, your post in this thread, from 11/02/2007, with the lisp command in it, was golden!

I finally got time to do some of this, and I had a great team member who helped make it happen. He opened up Tool Palettes, created a new palette> Customize Commands> create a new command (selected the star with *), scrolled down to Command1, and renamed it to a command name. Selected the > at the lower rt bottom of dialog box, and edited the Macro field with your lisp command. Once that was done, we slid the command from the left column over to the tool palette, and it was smart! We tested a circuit breaker, and it worked like a charm, breaking the wire!  My goal is using the smart tool palette for terminal blocks, and circuits. One thing we noticed, is if the parts are in different directories, the pathname needs to be included in the lispcommand, and the slashes need to be forward slashes (/).

 

(C:wd_insym2 "path" nil 1 0) .

 

We chose to not have the dialog box pop up, so thank you for the descriptions about that also.

 

Very grateful!

Gail

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

Post to forums  

Autodesk Design & Make Report

”Boost