cancel
Showing results for 
Search instead for 
Did you mean: 
EN
cancel
Showing results for 
Search instead for 
Did you mean: 
YONGWOO KIM
Participant

How to catch event when merge file and import point cloud?

In AC28.

 

File -> Interoperability -> Merge -> Merge from File...

 

File -> Interoperability -> Import Point Clouds...

 

I want to catch event when merge file or import point clouds.

 

Is there any ACAPI_Notification function to catch that?

 

If it is impossible, how can I merge file and point cloud using api?

 

I need element guids when file merged.

1 Solution

Accepted Solutions

I've found something for merging:
Maybe ACAPI_ProjectOperation_CatchProjectEvent with APINotify_ChangeProjectDB could work.
According to the APIProjectEventHandlerProc documentation, it has a parameter which indicates a Merge for APINotify_ChangeProjectDB.
Haven't tested it, but could be a good direction to investigate.

 

Hope that helps,
Bernd

 

Automating Archicad with Add-Ons, GDL-Objects & Python Archi-XT.com

Go to post

4 Replies 4

Hi!

I'm not sure but it might be possible to catch the point cloud as a new element on import. I don't have time to test so I can only give you the link to the command to try for yourself: https://graphisoft.github.io/archicad-api-devkit/group___element.html#gaa640b4d073a2e78c2eb83fe351de...
Maybe that could help.

For catching merged files I don't have an idea right now.

 

Best,
Bernd

Automating Archicad with Add-Ons, GDL-Objects & Python Archi-XT.com

I've found something for merging:
Maybe ACAPI_ProjectOperation_CatchProjectEvent with APINotify_ChangeProjectDB could work.
According to the APIProjectEventHandlerProc documentation, it has a parameter which indicates a Merge for APINotify_ChangeProjectDB.
Haven't tested it, but could be a good direction to investigate.

 

Hope that helps,
Bernd

 

Automating Archicad with Add-Ons, GDL-Objects & Python Archi-XT.com
YONGWOO KIM
Participant

 

Thanks for your help.

 

I was able to catch the events related to File merge.

 

However, for point cloud, I can catch the APINotify_ChangeLibrary and APINotifyElement_New events.

 

It seems that there is no way to distinguish between events that occur when loading a library or creating an element.

If I understand you correctly you get both notifications APINotify_ChangeLibrary and APINotifyElement_New when you are loading a point cloud?
Maybe you can check which libraries are loaded or what the specific object is created (e.g. library item id or object sub type) to differentiate from other created elements.

Automating Archicad with Add-Ons, GDL-Objects & Python Archi-XT.com

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!