顯示具有 IpfcParamValue 標籤的文章。 顯示所有文章
顯示具有 IpfcParamValue 標籤的文章。 顯示所有文章

2016年5月19日 星期四

Creo How to import points? 如何匯入點群

Creo How to import points?


工作上有時候需要從外部讀入曲面的資料,尤其是逆向工程由3D量側的點群,該如何作呢?

1) Open a new text file with the x, y, z locations and key in x y z  coordinate

-100.000 -40.013   1.255
 -99.999 -45.012   1.276
-100.001 -50.011   1.292
 -99.999 -55.009   1.305
 -99.999 -60.007   1.311
 -99.999 -65.006   1.309





2) Save as text file as "*,pts" => "new-file-name.pts"


3) Insert points into a part file using Import function (Creo)

Import

http://creosimpleautomation.blogspot.tw/


Open a pts file

http://creosimpleautomation.blogspot.tw/






Done

http://creosimpleautomation.blogspot.tw/


Enjoy it!





2016年3月6日 星期日

[Creo VBA] How to update Parameters ?

How to update Parameters?

在前面,有介紹如何變更參數Creo VBA API_由Excel設計變更修改Creo Parameter參數

,這裡用一個簡單的範例來說明參數是如何的更新,以及程式碼的分享。

Here's a simple example to illustrate how to update parameters, and share code.


1) 先在Creo 中設定好模型與參數
     First Create a model and set parameters.




2) 參數表 Parameter table



3) Excel VBA撰寫程式與介面
     Programming and  interface.



4)執行Excel VBA,同步設計變更
   Executive Excel VBA, synchronous design changes.



5) Update Parameter => Excel VBA Code

'-------------------------------------------------------
Private Sub Update_Dim_Click()

Dim px As IpfcParameterOwner
Dim p01(3), p02(3) As String
Dim p1 As IpfcParameter
Dim p2 As IpfcBaseParameter
Dim Mitem As CMpfcModelItem
Dim pv1 As IpfcParamValue

...
...
...

End Sub

'-------------------------------------------------------