Jump to content

Strip file extension


jonathann3891

Recommended Posts

Is it possible to strip the file extension (.dwg) of a selected file using the method I have detailed below?

 

Here I am selecting a block and storing the block name in appdata.

(defun c:ttt (/)
  (setq PileType (getfiled "Select Pile Drawing" "Z:\\ECI CAD\\AutoCAD\\PileDriver\\Pile Data\\" "dwg" 8))
  (setcfg "AppData/PileDriver/Pile_Type" PileType)
  (princ)
  )

Here I am recalling the name of the block stored in appdata.

(defun c:foo (/)
  (setq PileType (getcfg "AppData/PileDriver/Pile_Type"))
  (setq bname (??))
  )

Is it possible to strip the file extension (.dwg) from PileType and set it as bname?

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