乐筑天下

搜索
欢迎各位开发者和用户入驻本平台 尊重版权,从我做起,拒绝盗版,拒绝倒卖 签到、发布资源、邀请好友注册,可以获得银币 请注意保管好自己的密码,避免账户资金被盗
查看: 52|回复: 4

[编程交流] to make a DWG , from an XLS, b

[复制链接]

32

主题

430

帖子

423

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
150
发表于 2022-7-6 21:51:12 | 显示全部楼层 |阅读模式
I have a:
1st
xls with columns block-name att1-tag to attn-tag could be about 15 att. and columns ,at the same row with att-values. last colummn to set order number  or empty , to insert the block. All  data at the same row
 
2nd
a dwt template , modelspace empty
the block collection at Adoc
all features by user
 
3rd Populate the modelsapce with blocks   in a row as wide has paper space wide  , and a line conecting each block with subsecuent block .
 
It´s kind of a unifilar circuit , no branchs
 
4th save as phat/project.dwg   
Hope it is clear
5th print the dwg as pdf file
6th Open   the pdf file
The user will never manipulate the dwg , it is a commercial person , no  ACAD skill.
Hope it is clear
 
 
Or at least I need to see  xls-VBA to dwg from XLS , NOT acad-VBA  to dwg.
I´m proficient in VLISP, I want to start in this new task.
Thank in advance
 
Its a project in my mind , not materialized neither in XLS and  DWT
 
I just want to know if it is possible , and the first  step on XLS VBA to ACAD .
 
Off course the user station hold XLS,  it´s ACAD VBA complements , and ACAD,
 
Thanks in advance.
 
回复

使用道具 举报

106

主题

1万

帖子

101

银币

顶梁支柱

Rank: 50Rank: 50

铜币
1299
发表于 2022-7-6 22:17:37 | 显示全部楼层
Three ways
 
Write a script inside excel using VBA.
 
Or write a csv file of the data then using the commands line by line. Get the convert a csv to a list by Lee-Mac. Will make life easier.
 
3rd is do a direct read from excel of the cell values get a copy of Getexel.lsp it has all the functions you need.
 
Lastly you can use a Lisp to plot the result.
 
Me 2nd method only because I have all the bits of code to patch together.
 
Let us know which way you want to go.
回复

使用道具 举报

32

主题

430

帖子

423

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
150
发表于 2022-7-6 22:24:58 | 显示全部楼层
Hi Bigal, as I state at the post
 
 
As so , ACAD , shall not be handled
 
Or maybe do a DOS  macro to open the acad session , and execute the script, it seem to be some a DOS command , I do not know how to do it .
 
I will take a look at Getexel.lsp .
 
Thanks
回复

使用道具 举报

106

主题

1万

帖子

101

银币

顶梁支柱

Rank: 50Rank: 50

铜币
1299
发表于 2022-7-6 22:47:43 | 显示全部楼层
If you can teach them the real basics open Auocad with a preferred template, do this by using a desktop icon with the correct defualt dwt, and then get them to type in the one lisp command. The rest should happen automatically.
 
If you want to go down the custom desktop icon look at the properties of the acad icon "C:\Program Files\Autodesk\AutoCAD Civil 3D 2013\acad.exe" /P > you can force a dwg to be opened. Pretty sure you can force a script to run also. Autocad can control excel so it could do the save as csv step. Just make a copy of your default icon.
 
https://knowledge.autodesk.com/support/autocad/troubleshooting/caas/sfdcarticles/sfdcarticles/Startup-switches-for-AutoCAD.html
回复

使用道具 举报

32

主题

430

帖子

423

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
150
发表于 2022-7-6 22:59:54 | 显示全部楼层
Sad to say.The operator shall not  touch Acad.  I have to dig on vba from excell .
 
Thanks for your help.
回复

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

QQ|关于我们|小黑屋|乐筑天下 繁体中文

GMT+8, 2025-3-4 13:52 , Processed in 0.326253 second(s), 62 queries .

© 2020-2025 乐筑天下

联系客服 关注微信 帮助中心 下载APP 返回顶部 返回列表