跳到主要內容

批次圖塊替換含屬性同步及多圖層套用 Batch block replacement including attribute copying and multi-layer application

批次圖塊替換含屬性複製及多圖層套用 

Batch block replacement including attribute copying and multi-layer application


 操作詳解 Detailed Operation Instructions

1.於AUTOCAD按或輸入NBLOCKREPLACE,開啟後如下圖。
In AutoCAD, press or type NBLOCKREPLACE. The window will open as shown in the image below.


2.點選 選取被取代之圖塊按鈕

Click the "Select Block to Replace" button.

3.選取圖面想要替換的圖塊如PA 2V。
Select the block you want to replace, such as PA 2V.



4.視窗便出現以下訊息,由畫面可知以舊圖塊之圖塊名稱為”1CB”,圖層為”BLOCK”,依固定屬性EQUIPMENT,SYSTEM若有數值則可篩選出有39個相同圖塊,並產生圖層清單,以做多選圖層用。

The window will display the following message. The screen shows that the old block's name is "1CB", its layer is "BLOCK", and based on the fixed attributes EQUIPMENT and SYSTEM, if values ​​are present, it will filter out 39 identical blocks and generate a layer list for multi-layer selection.

5.接著選取指定取代之新圖塊,例如點選從檔案按鈕。

Next, select the new block to replace, for example, by clicking the "From File" button.



6.例如系統圖用之圖塊路徑如下:D:\xx

For example, the block path used in an electrical system diagram is as follows: D:\xx

 

7.選取1AA.DWG

Select 1AA.DWG



8. 新圖塊屬性便匯入到視窗中,檔案路徑為剛剛選取的路徑及檔名,選取結果顯示剛剛試點選從檔案

The new block attributes will be imported into the window. The file path is the path and filename just selected. The selection result shows that the previously selected "From File" was used.


9. 若新圖塊想沿用舊圖塊某些屬性的數值,可以按舊值複製到新值,新數值便無需自行鍵入。

If you want the new block to use some attribute values ​​from the old block, you can click "Copy Old Values ​​to New Values." The new values ​​do not need to be entered manually.

 



10.接著按表格中的匯入打勾,如EQUIPMENTSYSTEM,取代便會由灰轉紅,意思是僅紅色箭頭是有效的,其餘灰色箭頭不會將屬性匯入圖塊。

Next, check the "Import" boxes in the table, such as EQUIPMENT and SYSTEM. The "Replace" boxes will turn from gray to red, meaning that only the red arrows are valid, and the other gray arrows will not import the attributes into the block.

 


11.若新屬性不是自己想要的變更的選項,可以點選出現選單,選擇已有的所有屬性去挑選如”SYSTEM”

If the new attribute is not the option you want to change, you can click to bring up the menu and select all existing attributes, such as "SYSTEM."

 


12.新數值也可以點選更改成想要的數值。

You can also click to change the new values ​​to the desired values.



13. 若未選匯入,就按替換圖塊按紐,則會出現以下訊息。

If import is not selected, clicking the "Replace Block" button will display the following message.



14.當新屬性和新數值都確定後,再考慮是否有其他圖層也有相同圖塊名稱和同屬性,若有,則再多選圖塊圖層清單選取多個圖層,選取後會再過濾有多少圖塊數。

After the new attributes and values ​​are confirmed, consider whether other layers have the same block name and attributes. If so, select multiple layers from the block layer list. The selection will then be filtered based on the number of blocks.




15.若無也可不選,不影響取代過程。但選取到無相關的圖層,會出現警語訊息如下:

If none are selected, this step is optional and will not affect the replacement process. However, selecting an unrelated layer will result in the following warning message:




16.此按鈕功能為清除所有產生資料的文字。

This button clears all text generated in the data.

 


17.若依序剛剛要用1AA.DWG取代1CB,便按替換圖塊按鈕 ,圖面便會立即更換,並出現完成訊息,圖面如下。

If you just replaced 1CB with 1AA.DWG, clicking the "Replace Block" button will immediately change the drawing and display a completion message, as shown below.

 





18.若在選取完舊圖塊,未選新圖塊,或者未選取舊圖塊,都會出現以下錯誤訊息。

If you select the old block but not the new block, or select neither the old block nor the new block, the following error message will appear.

 


19.作業完成後,便可按離開。

After completing the task, you can click "Exit".



留言

這個網誌中的熱門文章

AUTOLISP 和 OPENDCL 使用前設定 AUTOLISP and OPENDCL Pre-use settings

特點: OPENDCL對於二次開發AUTOCAD,有很大的方便性,原本一般開發AUTOCAD之視窗需藉由VBA/DCL等方式規劃,視窗組成都需用程式撰寫,但OPENDCL完全使用零件模組移動,並設定屬性,且為了防止盜用,可編譯成亂碼加入AUTOLISP,但缺點是使用 OPENDCL開發之程式需灌RUNTIME才能使用,優多於弊,何樂不為 。

[FREE] PDF單檔或多檔批次匯入為DWG Import single or multiple PDF files into DWG

利用此指令,可以利用技巧達到: 多檔全輸出 單檔多頁全輸出 單多頁選擇範圍輸出 插入頁面接續不重疊 檔案選取附路徑貼上功能(如圖2) 頁面產生為圖塊或非圖塊選擇

自動匯入頁碼及建立配置Automatically import page numbers and create layouts

緣由: 由於一般圖紙需要用A4/A3出圖,通常繪圖先要框出A4/A3尺寸後,將圖繪入,出圖用配置時才能產生出準的A4/A3圖紙,"產生圖框"便由此而來。 自動產生頁碼:可由左至右,上至下,依序自動依特定屬性產生頁碼。 依選取自動帶入A1/A2/A3/A4範本後,自動對齊產生配置 最後可方便將所有配置匯入圖紙集,集中管理。