Quantcast
Channel: ArchiCAD-Talk - Developer Forum
Viewing all 564 articles
Browse latest View live

Visual Feedback in 3D view

$
0
0
Author:Xylios
Posted: Thu Feb 25, 2016 4:41 pm (GMT+1)


Hello,

I have an addon that is creating a large number of elements, and I wanted to be able to view the elements being created in the 3D view.

My addon can be used while on the 3D view, but there is no elements being created. They only appear when the program finishes.

Anyone know how to view the creation of elements in ArchiCAD in the 3D view while the addon is working?

Thanks in advance,
Xylios


Differentiate between Element Group and Hotlink Group?

$
0
0
Author:Erenford
Posted: Mon Mar 07, 2016 8:18 am (GMT+1)


How do you tell if the element is grouped by the user or is merely just inside a hotlink module? What I use is if there is a groupGuid value present although hotlinked elems also have a groupGuid and are being considered by ACAPI_ElementGroup_GetGroupedElems as a legit group even if they weren't grouped by the user and are just part of a hotlink.

Using ACAPI_ElementGroup_GetGroupedElems(groupGuid):
- Grouped elems (hotlinked or not) returns their immediate elems => this is what I need
- Non-grouped non-hotlinked elems have no groupGuid thus ignored => also ok
- Non-grouped hotlinked elems have a groupGuid and will return immediate elems (all fellow hotlinked elems) => not ok, I don't need this

Basically what I need are elements that are grouped only by the user regardless if its in a hotlink module or not, and any non-grouped elems (hotlinked and otherwise) should be ignored. Any Ideas?
_________________
Archicad 18 6101 INT FULL
Archicad 19 3003 INT FULL
Win 7 Pro SP 1 64-bit
Intel Core i5 CPU 750 @2.67GHz

How get 2d bounds of the Hatch

$
0
0
Author:Tsepov
Posted: Wed Mar 09, 2016 10:34 am (GMT+1)


API ArchiCAD 19 win.

Please, help me).
I try to get the bounds (minX,minY,maxX,maxY) for the Hatch element.
How I can get them by easy way?

Thank you!)
_________________
ArchiCAD - The Best!!!

How get 2d bounds of the Hatch

$
0
0
Author:Ralph Wessel
Posted: Wed Mar 09, 2016 11:40 am (GMT+1)


Tsepov wrote:
I try to get the bounds (minX,minY,maxX,maxY) for the Hatch element. How I can get them by easy way?

A call to ACAPI_Database with APIDb_CalcBoundsID will do that.
_________________
Ralph Wessel
Cadimage

[SOLVED] New line in dimension note

$
0
0
Author:ReignBough
Posted: Wed Mar 09, 2016 12:14 pm (GMT+1)


Can anyone move this post on Developer forum, please? I post it on a wrong forum. Thanks.
_________________
~ReignBough~
[ArchiCAD 19 INT 4013 FULL]
[Windows 7 Pro Intel Core i5 CPU 750 @ 2.67 GHz 8.00 GB 64-bit OS]

How get 2d bounds of the Hatch

$
0
0
Author:Tsepov
Posted: Wed Mar 09, 2016 12:28 pm (GMT+1)


Ralph, thank you very much!)
_________________
ArchiCAD - The Best!!!

[SOLVED] New line in dimension note

$
0
0
Author:laszlonagy
Posted: Wed Mar 09, 2016 10:53 pm (GMT+1)


I have moved it to the Developer Forum.
_________________
Laszlo Nagy, Moderator, Site Admin
ASUS G73SW, i7-2630QM 16 GB RAM
17.3" (1920x1080), NVidia GTX 460M 1.5 GB RAM
60 GB SSD, 750 GB HDD, Win7-64 ENG
AC13-AC19 (64-bit, latest build)
Loving ArchiCAD since 1995

Outdated Add-on

$
0
0
Author:Xylios
Posted: Wed Mar 09, 2016 11:29 pm (GMT+1)


Hello,

I developed an add-on that was built using the API DevKit 18 (on a windows 8.1 machine), and works on ArchiCAD 18 on some of my machines. I tried it on two machines using windows 8.1 and it worked. However, when I tried loading the add-on on ArchiCAD 18 on windows 7 and windows 10, I get the error of outdated add-on.

Does anyone know a solution to this problem?

Thank you,
Xylios


Spline: how to determine the number of points?

$
0
0
Author:Tsepov
Posted: Thu Mar 10, 2016 8:04 am (GMT+1)


ArchiCAD API 19.

I need to move and rotate the spline.
Memo contains **coords but where are stored the number of points?

Thank you!)
_________________
ArchiCAD - The Best!!!

Spline: how to determine the number of points?

$
0
0
Author:Ralph Wessel
Posted: Thu Mar 10, 2016 10:56 am (GMT+1)


Tsepov wrote:
I need to move and rotate the spline.
Memo contains **coords but where are stored the number of points?

You can get the size of the allocated handle and divide it by the size of a single coordinate, e.g.
Code:
BMGetHandleSize((GSHandle) memo.coords) / sizeof(API_Coord)

However, if you want to move and/or rotate the whole spline it would be easier to apply a transformation to the element with ACAPI_Element_Edit and passing the transformation in a API_EditPars structure.
_________________
Ralph Wessel
Cadimage

[SOLVED] New line in dimension note

$
0
0
Author:Ralph Wessel
Posted: Thu Mar 10, 2016 10:59 am (GMT+1)


ReignBough wrote:
I found out that the note in dimension can now be a multi-line. But when I tried using "\n" it was shown as the replacement character "▯" but it is correctly displayed in the settings dialog. When I tried using paragraph marker, "¶", it is shown as it is.

How about creating a multi-line dimension manually (i.e. with ARCHICAD's tools) and then examining the resulting data through the API to see what delimiter it uses?
_________________
Ralph Wessel
Cadimage

Outdated Add-on

$
0
0
Author:Ralph Wessel
Posted: Thu Mar 10, 2016 11:03 am (GMT+1)


Xylios wrote:
I developed an add-on that was built using the API DevKit 18 (on a windows 8.1 machine), and works on ArchiCAD 18 on some of my machines. I tried it on two machines using windows 8.1 and it worked. However, when I tried loading the add-on on ArchiCAD 18 on windows 7 and windows 10, I get the error of outdated add-on.

It might be a problem with the installed VS 2010 runtime - refer to this topic.
_________________
Ralph Wessel
Cadimage

Getting a API_Guid from Library part

$
0
0
Author:gehairing
Posted: Thu Mar 10, 2016 12:01 pm (GMT+1)


Hello the Forum Smile

What is the most clean method for getting an API_Guid from a Library part (API_LibPart) ?

I need to get & set IFC Data of a Library part.

Thanks.

Outdated Add-on

Getting a API_Guid from Library part

$
0
0
Author:gehairing
Posted: Thu Mar 10, 2016 4:48 pm (GMT+1)


Hum...i answer to my own question Smile

Code:
GS::UniString s = libpart.ownUnID;
GS::Guid gs_guid(s);
API_Guid ag  = GSGuid2APIGuid (gs_guid);


It seem's to work but i'm not sure it's the best method.


Getting a API_Guid from Library part

$
0
0
Author:gehairing
Posted: Thu Mar 10, 2016 5:13 pm (GMT+1)


Error : It doesn't work Sad

Getting a API_Guid from Library part

$
0
0
Author:gehairing
Posted: Thu Mar 10, 2016 7:09 pm (GMT+1)


I have made a test function.

The functions gets the selected element in the model and get his API_Guid.
It also tries to get the GUID from the library part (if an library part is selected of course).

When I compare the Guid's...there are different.
Probably i am not understanding how all this works.


Code:
   // Scan all selected objects in AC
   API_SelectionInfo selectionInfo;
   API_Neig **selNeigs;
   err = ACAPI_Selection_Get (&selectionInfo, &selNeigs, false);
   if (err == NoError)
   {
      // If we have selected elements
      if (selectionInfo.typeID != API_SelEmpty)
      {
         UInt32 ii, nSel;
         nSel = BMGetHandleSize ((GSHandle) selNeigs) / sizeof (API_Neig);
         for (ii = 0; ii < nSel && err == NoError; ii++)
         {
            // Get selected element
            API_Element  element;
            BNZeroMemory (&element, sizeof (API_Element));
            element.header.guid  = (*selNeigs)[ii].guid;
            err = ACAPI_Element_Get(&element);
            if(err == NoError)
            {
               // Is it a library part
               API_LibPart libpart;
               BNZeroMemory (&libpart, sizeof (libpart));
               libpart.index = element.object.libInd;
               err = ACAPI_LibPart_Get (&libpart);
               if (err == NoError)
               {
                  // Yes it's a library part

                  // Get elements guid
                  API_Guid good_ag = element.header.guid;
                     

                  
// Get Guids from the library part and NOT from selected element
                  GS::UniString s = libpart.ownUnID;
                  GS::Guid gs_guid(s);
                  API_Guid bad_ag  = GSGuid2APIGuid (gs_guid);

                  GS::UniString s1 = libpart.parentUnID;
                  GS::Guid gs_guid1(s1);
                  API_Guid bad_ag1  = GSGuid2APIGuid (gs_guid1);

                  DumpIFCProperties(libpart, good_ag);

Spline: how to determine the number of points?

$
0
0
Author:Tsepov
Posted: Thu Mar 10, 2016 7:14 pm (GMT+1)


wow)
Ralph, thank you so much again!)
_________________
ArchiCAD - The Best!!!

Start Edition

$
0
0
Author:stefan
Posted: Thu Mar 10, 2016 9:14 pm (GMT+1)


I can confirm that we can run the add-in from ArchiCAD 19 on the Start Edition 2016 (without special re-compilation).
_________________
--- stefan boeykens --- architect-engineer-musician ---
ArchiCAD18-19/Revit2016/SketchUp2015/Cinema4D16/Rhino5/Unity5
rMBP15:i7Quad2.3Ghz+16GB+nVidia650M/ElCapitan+Win10

http://bit.ly/17u87df

[SOLVED] New line in dimension note

$
0
0
Author:ReignBough
Posted: Fri Mar 11, 2016 10:48 am (GMT+1)


Ralph Wessel wrote:
How about creating a multi-line dimension manually (i.e. with ARCHICAD's tools) and then examining the resulting data through the API to see what delimiter it uses?


Thanks. Found it. It is ASCII 13, or 0x0D, or '\r'.
_________________
~ReignBough~
[ArchiCAD 19 INT 4013 FULL]
[Windows 7 Pro Intel Core i5 CPU 750 @ 2.67 GHz 8.00 GB 64-bit OS]

Viewing all 564 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>