Share

AcGs Global Functions

Description

Defines global functions specific to AcGs classes.

Functions

Function Description
acgsCreate2DViewLimitManager This function creates an AcGs2DViewLimitManager for the viewport specified by viewportNumber and returns a pointer to the newly created object. Returns null if the function fails.
acgsDestroy2DViewLimitManager Deletes the AcGs2DViewLimitManager pointed to by pLimitManager.
acgsDisplayImage This function displays the image whose data is pointed to by imageData within the viewport identified by viewportNumber. (This number is the same as the numbers reported by the CVPORT AutoCAD system variable. For example, the Paper Space viewport is number 1.) The next time the viewport is cleared with a "redraw" command, the image is removed and forgotten. You must specify the destination viewport (which must not be 0), the origin of left-top pixel of the image on the screen, the size of the image in pixels, and the image data.The data is a contiguous stream of... more
acgsDrawableCached Query the graphics system (GS) for cached graphics status of the specified AcGiDrawable.
acgsDrawableErased This notification informs the graphics system (GS) that the graphics of the specified AcGiDrawable have been erased. The parent information is not required and can be set to NULL. If provided, the GS will make the appropriate changes to the parent drawable's cache to reflect the changed status. This allows for faster partial cache updates. In order for this to be effective, however, the GS client must also take care to avoid notifying the parent directly of the same change.
acgsDrawableModified This notification informs the graphics system (GS) that the graphics of the specified AcGiDrawable have been modified. For maximum efficiency, this should be called only when the geometry, attributes, or child list of the AcGiDrawable is modified. The parent information is not required and can be set to NULL. If provided, the GS will make the appropriate changes to the parent drawable's cache to reflect the changed status. This allows for faster partial cache updates. In order for this to be effective, however, the GS client must also take care to avoid notifying the parent directly of the same change... more
acgsGetActiveGraphicsKernels Gets an array of active graphics kernels.
acgsGetActiveModels Gets an array of active graphics models.
acgsGetActiveModels Get an array of active "main" graphics models for a database.
acgsGetCurrent3dAcGsView Use this function to retrieve the persistently shaded AcGsView associated with the specified viewport. This method will return NULL if there is no such view.
acgsGetCurrentAcGsView Use this function to check the capabilities of the current view.
acgsGetCurrentGsManager Gets the AcGsManager associated with the current MDI Client Window.
acgsGetDisplayInfo This function retrieves the dimensions of AutoCAD's drawing area. The first two parameters will be filled in with the size of the actual drawing area, not including the screen menu, if present. The last parameters are filled in with the number of pixels per logical inch along the screen width and height, which are most commonly used to calculate the aspect ratio of the AutoCAD display. aspectWidth and aspectHeight are the same values as the Windows LOGPIXELX and LOGPIXELY values.Returns Adesk::kTrue if successful. If a failure occurs, the parameters will remain unchanged and the function will return Adesk::kFalse.... more
acgsGetGsHighlightModel Gets the current display's highlight AcGsModel that is associated with the specified AcDbDatabase.
acgsGetGsManager This function returns the AcGsManager object for a specified AutoCAD MDI Client CView.
acgsGetGsModel Gets the AcGsModel corresponding to the input mode, subDrawingMode and viewportNumber.
acgsGetGsModel Gets the current display's AcGsModel that is associated with the specified AcDbDatabase.
acgsGetHighlightColor Returns the highlight color index for the current display. Highlight color indexes are in the range 0 to 255.
acgsGetHighlightLinePattern Returns the highlight line pattern for the current display. See the AcGs::LinePattern enum for possible line pattern values.
acgsGetHighlightLineWeight Returns the highlight lineweight index for the current display. Highlight lineweight indexes are in the range 0 to 255.
acgsGetHighlightStyle Returns the highlight style for the current display.
acgsGetLensLength Gets the lens length in millimeters for the indicated viewport. The input viewportNumber corresponds to the viewport identification number (this is the same type of number returned by the CVPORT system variable).Returns true if the specified viewport exists, false otherwise.
acgsGetOrthoViewParameters This helper function is used to retrieve the UCS specified by view.
acgsGetScreenShot This function returns a pointer to a new AcGsScreenShot for the viewport identified by viewportNumber. (This number is the same as the numbers reported by the CVPORT AutoCAD system variable. For example, the Paper Space viewport is number 1.) AcGsScreenShot objects are available for each individual viewport, and also for the special viewport "0", which encompasses all viewports. Screen shots are images of the drawing surface, and do not include overlayed items such as dialogs, pointers, or other windows.If viewportNumber is not valid, NULL is returned.The caller is responsible for deleting the returned AcGsScreenShot object.For example:... more
acgsGetViewParameters Gets the view parameters for the indicated viewport. The input viewportNumber corresponds to the viewport identification number (this is the same type of number returned by the CVPORT system variable).Returns true if the 2d->3d view definition copy succeeded (the specified viewport exists and is in a safe state for queries) and returns false otherwise
acgsGetViewportInfo This function retrieves the dimensions of the viewport identified by viewportNumber. (This number is the same as the numbers reported by the CVPORT AutoCAD system variable. For example, the Paper Space viewport is number 1.) Left, bottom, right, and top are filled in with the boundaries of the viewport in screen pixels, relative to the bottom left of the drawing area. If the viewport number supplied is not valid, then the routine will return Adesk::kFalse and the parameters will not be altered.Returns Adesk::kTrue if successful. If viewportNumber is invalid or some other failure occurs, left... more
acgsObtainAcGsView Use this function to obtain a view after specifying the requirements on the view.
acgsRedrawShortTermGraphics This function causes the short-term graphics (highlights, grips, blips, and so on) to be redrawn in the client window rectangle specified by minx , miny, maxx, and maxy.
acgsRemoveAnonymousGraphics This function will remove the anonymous graphics (like blips, ads_xxx function graphics, and images added with acedDisplayImage) from the viewport specified by viewportNumber. (This number is the same as the numbers reported by the CVPORT AutoCAD system variable. For example, the Paper Space viewport is number 1.) If viewportNumber is 0, then all viewports will have their anonymous graphics removed.Returns Adesk::kTrue if successful; otherwise, returns Adesk::kFalse.
acgsSetCustomUpdateMethod This function sets the function pointed to by custom_update_method to be called after AutoCAD has updated its long-term graphics (all persistent geometry), but before the short-term graphics (blips, grips, cursor, icon, highlights, and so on) are updated. This allows an application to draw graphics that will not be overwritten by AutoCAD's longterm graphics.Only a single application at a time can take advantage of this functionality. This means that this function will only succeed in setting custom_update_method as the callback if there is no other callback function currently registered.A callback function should unregistered as soon as it is no... more
acgsSetGsHighlightModel Sets the association between the specified database and highlight model for the current display.
acgsSetGsModel Sets the association between the specified database and model for the current display.
acgsSetHighlightColor In AutoCAD, there are two types of color effects: dash and glow effect.. Sets the highlight color for the current display to colorIndex. colorIndex must be in the range 0 to 255. You can get the current color index of highlight effect by using the acgsGetHighlightColor, and index 0 refers to default color If colorIndex is outside the acceptable range, this function does nothing.
acgsSetHighlightLinePattern Sets the highlight line pattern for the current display to pattern. See the AcGs::LinePattern enum for possible line pattern values.
acgsSetHighlightLineWeight Sets the highlight lineweight for the current display to weight. weight must be in the range 0 to 255. If weight is outside the acceptable range, this function does nothing.
acgsSetHighlightStyle Sets highlight style for the current display.
acgsSetLensLength Sets the lens length in millimeters for the indicated viewport. The input viewportNumber corresponds to the viewport identification number (this is the same type of number returned by the CVPORT system variable).Returns true if the specified viewport exists, false otherwise.
acgsSetView2D This function sets the viewport specified by viewportNumber back to 2D mode and destroys the AcGsView being held by the viewport.Returns true if successful; otherwise, returns false.
acgsSetViewParameters Sets the view parameters for the indicated viewport. Pass in true for bRegenRequired if the new view requires a 2D regen for proper synchronization; otherwise, pass in true for bRescaleRequired if a simple 2D rescale is required for proper 2D-3D synchronization. If neither is required, pass in false for both.bSyncRequired is used to update the underlying 2D view parameters with the new parameters, without causing either a rescale or a regen. It is useful in 3D viewports, after a view change, where a regen is no longer required, but the 2D view must be kept in sync.
acgsSetViewportRenderFlag This function sets the render flag to true in the viewport specified by viewportNumber. The render flag of an AcViewport object should be set to true when a rendered image is added to the display list. When the image graphics are removed, the flag is automatically set to false. This flag is used internally by the shaded viewport plotting feature.
acgsWriteViewToUndoController This method is used to save the specified viewport's camera parameters to the AutoCAD undo controller so that view modifications by be undone via the UNDO command.

Was this information helpful?