Jump to content

Insert block from pull down menu, Show outline shape of block


sketch11

Recommended Posts

I have a custom menu which inserts steel sections as blocks. This is done with an MNU file, loaded using a SCR (script) file.

There is one file for each section, all drawings, MNU file and SCR file are all placed in one folder.

Another functionality was required ... to have unique block names, so an LSP file is created which tags on the Date to the block name to the nearest second (maybe not the best option but is good enough). Note this was set to auto load.

See attached files. If testing, place in C drive in a new folder called "Folder1" .

 

There is one more functionality needed. When a section is chosen from the menu, I would like to see an outline of the section.

In the menu I have Universal Beams and Universal Columns. For testing purposes, the Universal Beams are inserted using the LSP code, and this is where I'd like to see the outline. The Universal Columns are added without the LSP code ... and you can see the outline ... however in this instance the block names would not be unique.

 

[Note: Could not Zip files for some reason, so only attached one UB dwg and one UC dwg].

 

TEST.mnu TEST.scr Blkins.lsp UniversalBeams_610UB125.dwg UniversalColumns_310UC158.dwg

Link to comment
Share on other sites

  • 4 weeks later...
  • 1 month later...

If this helps anyone, paste the following into the LISP file. By someone from another forum.

 

(defun blkins (blkname)
  (command "_.-insert" (strcat blkname "-" (rtos (getvar "cdate") 2 6) "=" blkname) pause 1 "" 0)
)
Link to comment
Share on other sites

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...