Jump to content

Recommended Posts

Posted

I am trying to record some repeated actions but cannot find the record button.

attachment.php?attachmentid=58545&cid=1&stc=1

I want to record a macro or something that will allow me to select an inner circle and it automatically runs a create solid command of the same diameter at a thickness .05, then waits for me to select the outer circle and it creates another solid of that diameter at 0.0078, then union subtracts the first solid from the second.

But I cannot find the macro record start on my AutoCAD Mechanical 2016??

LISP-fill.jpg

  • Replies 20
  • Created
  • Last Reply

Top Posters In This Topic

  • tmd_63

    9

  • RobDraw

    6

  • BIGAL

    3

  • SLW210

    2

Top Posters In This Topic

Posted Images

Posted

Manage tab, all the way to the left.

Posted

All I have there is User Interface (CUI)

Posted

Can't you turn on the other panels?

Posted

Hi Rob, If you mean panels to what I think they are, I have 3 panels. all on.

Customization, Applications and Migration.

Under Applications there is Load Application, Run Script, Visual Basic Editor, LISP editor, Run VBA Macro. But there is nothing to record a macro or script etc.

I can create a macro module, but I have to manual type the commands. I want to be able to record my keystrokes, mouse clicks etc like other macro recordings.

Posted

I have researched a little. And I have manually inputted ACTRECORD into the commandline.

I get a response of "**ACTRECORD command is disabled**"

Posted

So, you enabled it and issue resolved, yes?

 

BTW, Action Recorder is it's own panel.

Posted

I would have to go to my CAD manager as I don't have permissions for that level of customization. I'd have to look it up.

Posted (edited)

You will need to use the Vanilla AutoCAD profile most likely. That's how it was in AutoCAD Mechanical a few years ago.

 

Edit.

 

Here it is...https://knowledge.autodesk.com/support/autocad-mechanical/troubleshooting/caas/sfdcarticles/sfdcarticles/Error-ACTRECORD-command-is-disabled.html

Edited by SLW210
Add additional info.
Posted

The OPs trade is electrical and does not list using a vertical product. Not sure where mechanical came from, but the symptom could indicate the usage of mechanical. You might get lucky.

Posted (edited)

Just me but I found the macro record almost useless as it can not be cusomised very much when it comes to pick a new object to do something with. What you described can be done pretty easy in a simple lisp or script. The method would be select inner, select outer all done.

 

; simple  tube creator by Alan H July 2016
(defun c:dblh ( / obj1 obj2) ; tube creator
(setq obj1 (entsel "\nPick inner"))
(setq obj2 (entsel "\nPick outer"))
(command "extrude" obj1 "" 0.05)
(command "extrude" obj2 "" 0.05)
(command "subtract" obj2 "" obj1 "")
)

Edited by BIGAL
made it a defun
Posted

I use the Action Recorder all the time, really like it.

Not as versatile as being able to write a lisp, but for the sorts of things I use it for, much quicker, after all it is just a keystroke recorder.

 

Of course I am illisperate, but there definitely are tasks for which it is highly appropriate, on the fly. :beer:

Posted
The OPs trade is electrical and does not list using a vertical product. Not sure where mechanical came from, but the symptom could indicate the usage of mechanical. You might get lucky.

 

From the OP

 

But I cannot find the macro record start on my AutoCAD Mechanical 2016??
Posted

Thanks SLW20. That found the Action Recorder.

Posted

P.S. To make a PWB or to display the assembly details, I need to export the DXF from the CAD package and put it into some 3d drafting package. Hence using AutoCAD Mechanical. And the best way to get an accurate outline and fixing set-up, it is better to draw in AutoCAD first then import the DXF into the CAD package (either Altium, Cadence, Allegro, Mentor etc etc). AutoCAD or similar is still the best way to do the initial setup PWB shape and final visualisation.

Posted
Just me but I found the macro record almost useless as it can not be cusomised very much when it comes to pick a new object to do something with. What you described can be done pretty easy in a simple lisp or script. The method would be select inner, select outer all done.

 

(setq obj1 (entsel "\nPick inner"))
(setq obj2 (entsel "\nPick outer"))
(command "extrude" obj1 "" 0.05)
(command "extrude" obj2 "" 0.05)
(command "subtract" obj2 "" obj1 "")

 

Perfect BigAl. This will work great with the twin circles.

How can this be re-written to select the inner circle and then draw the outer using 2 corner points (for the square pad with round hole)?

Posted

If the square is a pline it will work as is, if is 4 lines then I would pedit the 4 together and run.

 

Otherwise you can pick circle and create a rectang nominating size square is a bit easeir L=W

 

3rd this would involve a check if its a "line" and then ask for L etc and create a new object.

 

Its not very hard to do can you provide some more info as to exactly what you have a little sample dwg would be good.

 

4th Code amended to a command line function.

Posted

I have a cut-down version of the file loaded. with some examples of what I am trying to achieve on a different layer.

 

The parts to create from are on layer 'TOPLAYER' and I need to create the 3d solids on 'TopCopper' this would also apply to any bottom layers too.

Temp-PCB.dwg

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...