乐筑天下

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

Reverse Ninja-Inserts

[复制链接]

4

主题

12

帖子

1

银币

初来乍到

Rank: 1

铜币
28
发表于 2014-2-18 07:43:56 | 显示全部楼层 |阅读模式
Wacky title, I know, but I think that discribes best, what I came across.
I converted a drawing  using the Lisp-Script I wrote and found some supposingly random positioned lines. First thought: "Ok, my misstake. I'll check the script."
I openes the .dwg file with BricsCAD to see what it's supposed to look like. In place of the few random lines were Inserts. Actual Inserts. I clicked them. They were there, in the Modelspace.
I thought I still made some kind of misstake with the way I handle Inserts, Blocks or LWPolylines in my script.
I opened the temporary textfile my script makes to check for the inserts. It didn't get any. So I checked the GetInsert function. It was just fine. Checked for GetLWPolylines and GETBlockRecords. Fine to. I made a DXF copy of the .dwg file and looked for the inserts in it with notepad++. I didn't find any of the missing block! I looked at the same dxf file in BricsCAD and they still where clearly there.
It's as if the Insert shows a picture, but hides it's code (that's why I called it reverse ninja).
I tryed inserting the Block again and I got an actual Insert, which I could read out with the script.
Does anyone have an Idea, how there can be Inserts, that don't show up as INSERT/AcDbBlockReference?
Is there a kind of new Insert type I don't know yet, that can refair to a block, without using it's block name?
Thanks in advance.
回复

使用道具 举报

116

主题

996

帖子

9

银币

顶梁支柱

Rank: 50Rank: 50

铜币
1466
发表于 2014-2-18 07:54:22 | 显示全部楼层
Can you post a drawing?
回复

使用道具 举报

4

主题

12

帖子

1

银币

初来乍到

Rank: 1

铜币
28
发表于 2014-2-18 08:01:34 | 显示全部楼层
All I possibly could is to take a screen of the "Insert" and it's Properties, I hope that helps you. I can't publish the actual files  for legal reasons.
回复

使用道具 举报

4

主题

12

帖子

1

银币

初来乍到

Rank: 1

铜币
28
发表于 2014-2-18 08:47:30 | 显示全部楼层
I just took the entire object section out of the .dxf file. It didn't change. So I guess my problem's not coming form there.
回复

使用道具 举报

4

主题

12

帖子

1

银币

初来乍到

Rank: 1

铜币
28
发表于 2014-2-19 02:29:32 | 显示全部楼层
Ok by deleting entity by entity with notepad++ I found out, that  the Insert in the screenshot, is actually an anonymous Insert. The entity points to a block named *U12. I took another look at my GetInsert function and well I actually still had an error in it.
Now I'm curious though: How can an Insert, that clearly points to a block named *U12 show up with an other block name in the property window of the GUI?
回复

使用道具 举报

116

主题

996

帖子

9

银币

顶梁支柱

Rank: 50Rank: 50

铜币
1466
发表于 2014-2-19 02:32:35 | 显示全部楼层

It's difficult to guess without seeing the drawing and/or the code you are using.
I prefer not to play guessing games.
回复

使用道具 举报

4

主题

12

帖子

1

银币

初来乍到

Rank: 1

铜币
28
发表于 2014-2-19 02:35:50 | 显示全部楼层
I managed to fix the misstake I made.
In this line of code, I sent "blkName" to the simplify function, like  on all other calls I made. The misstake? There's no blkName in the function, where I use this line.
  1. (if(= T(contentCheck(Blk_ENameLstNstd entName)))(simplify entName))

The question from my previous post is just curiosity now.
回复

使用道具 举报

4

主题

12

帖子

1

银币

初来乍到

Rank: 1

铜币
28
发表于 2014-2-19 02:49:37 | 显示全部楼层

I am lost but a BlockReference(Insert) is just a transformation as in scale, postion, rotation, etc...
So a dynamic block with references that has different visibility settings or entities that have been stretched independently of other references could not be a transformation of the same block. It would contradict what a Block is.
Blocks are static and should not vary per reference other than scale, rotation, postion, etc...
So there is nothing really dynamic about dynamic blocks, for each different representation it creates a new definition and a * in front of name keeps it from showing up in UI as in Block Edit dialog or insert dialog.
Maybe BlockDefinitionBuilder would have been better but does not sound as cool.
When you edit a dynamic block it creates another block definition and uses dynamic name in GUI but it actually transforming *U1 or whatever.
Write code that strips * from name of blocks except model space and you will see all the different anonymous blocks and will see dimensions are blocks named  *D1.....DN, Tables are blocks *T1....
回复

使用道具 举报

54

主题

3755

帖子

3583

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
438
发表于 2014-2-19 02:55:32 | 显示全部楼层
Thanks for the input Jeff.
One of the tiny obstacles I have to face is, that I've never actually made a real CAD drawing, I'm just supposed to convert them. With a lot of help from the people on here, I actually managed so far.
回复

使用道具 举报

86

主题

744

帖子

6

银币

顶梁支柱

Rank: 50Rank: 50

铜币
1092
发表于 2014-2-19 12:56:34 | 显示全部楼层
I feel like this thread was made specifically for ronjonp.
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-3-11 06:35 , Processed in 0.768435 second(s), 72 queries .

© 2020-2025 乐筑天下

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