Jump to content

Dialog box


Elias

Recommended Posts

Hi @Elias, it seems little bit generic as question.

which data you would like to export? Entire dwg a portion ? a line ? a table ?

what the dialog box shall show ?

please explain.

Thank you.

Link to comment
Share on other sites

@Elias

Ok now I understood.

There are more possibility:

1) Open Text File with the following code, and store coords into textfile, immediately save, so when you select on screen or in any other way your text or your block you can store there.

Due to I guess you have more than one text you have to insert a prefix like the text content or a simply progressive number like as

 

(This code shall be written inside Autocad VBA).

(see documentation on print # at https://docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/printstatement

 

PATH="C:\..... " ' insert the path where do you want to store your text file

TESTFILE ="NAME OF FILE TO CREATE"

Open PATH & "\" & TESTFILE For Output As #1 ' Open file for output.

Print #1, "Text1"; Text1.Insertionpoint(0);Text1.Insertionpoint(1); Text1.Insertionpoint(2)

or 

Print #1, Text1.Textstring; Text1.Insertionpoint(0);Text1.Insertionpoint(1); Text1.Insertionpoint(2)

 

'Text1.Textstring it's the text content

 

2) Open an Excel File and put coordinates into the cells of an opened sheet.

(This code shall be written inside Autocad VBA).

 

dim excelapp as object
dim wkbkobj as object

set excelapp = getobject (, "excel.application")
set wkbkobj = excelapp.workbooks.open (filename:="c:.....xls")

wkbkobj.Range("A1)".value = Text1.Textstring

wkbkobj.Range("B1)".value = Text1.Insertionpoint(0) 'X

wkbkobj.Range("C1)".value = Text1.Insertionpoint(1) 'Y

wkbkobj.Range("D1)".value = Text1.Insertionpoint(2) 'Z

 

You will find a lot of documentation how to point to Excel Cell from Autocad VBA.

I'm sure that @BIGAL will find the same code on LSP language instead VBA easy on Google, and he can help you on that side. :)

Edited by PeterPan9720
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...